help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help create function alias


From: Adam
Subject: Re: help create function alias
Date: Wed, 08 Dec 2010 15:29:07 -0000
User-agent: KNode/0.9.2

Stefan Monnier wrote:

>>>> I use (insert-date) often, but rather than a hotkey I'd
>>>> prefer M-x id  or  ALT-x id
>>> How 'bout:
>>> (define-key minibuffer-local-completion-map
>>> [(meta tab)] 'minibuffer-force-complete)
>>> 
>>> and then
>>> 
>>> M-x i-d M-TAB RET
>>> 
>>> or even
>>> 
>>> (define-key minibuffer-local-completion-map
>>> [(meta return)]
>>> (lambda ()
>>> (interactive)
>>> (minibuffer-force-complete)
>>> (minibuffer-complete-and-exit)))
>>> 
>>> and then
>>> 
>>> M-x i-d M-RET
>>> 
>>> 
>>> -- Stefan
> 
>> Thanks, lovely stuff, but i dash d not as intuitive as
>> my desired simplistic i d mnemonic or abbreviation.
> 
> Of course.  My suggestion is not nearly as simple as the thing you
> asked for.  Its main interest is that it's applicable to all commands
> rather than just to insert-date.
> Actually, without any change, you can already try M-x i-d TAB, tho
> you'll find there are many other commands that match this pattern.
> 
>> As mentioned below, I saw alias somewhere but couldn't
>> find it searching for alias* as its defalias. Beaut.
> 
> C-h f *alias TAB will include defalias, as will M-x apropos RET alias RET
> 
> 
>         Stefan

Both good revelations for me. I didn't know about the dash working 
for a double-banger completion search. Good. 

And I haven't been using M-x apropos, with wildcards. Good. 

Thanks. 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]