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: Stefan Monnier
Subject: Re: help create function alias
Date: Wed, 08 Dec 2010 15:29:06 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

>>> 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


reply via email to

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