[OS X Emacs] How to rebind the "recentf" key (C-x C-r)?

Nathaniel Cunningham nathaniel.cunningham at gmail.com
Sat Nov 26 08:28:04 EST 2011


Hello Alan,

On Thu, Nov 24, 2011 at 10:17 AM, Alan Schmitt <
alan.schmitt at polytechnique.org> wrote:

>
> I tried putting the following in both my .emacs or my Preferences.el, but
> when I start Aquamacs, C-x C-r is always bound to the default value (I
> think it's recentf-open-files).
>
> (defun recentf-ido-find-file ()
>  "Find a recent file using Ido."
>  (interactive)
>  (let ((file (ido-completing-read "Choose recent file: " recentf-list nil
> t)))
>    (when file
>      (find-file file))))
>
> (global-set-key "\C-x\C-r" 'recentf-ido-find-file)
>
> If I evaluate the last line, then everything goes well.
>
> Where should I put the rebinding so that it overrides the default one?


Putting your new function & binding command at the end of Preferences.el
works fine for me.  Aquamacs 2.4.

--Nathaniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20111126/72a66960/attachment.html>


More information about the MacOSX-Emacs mailing list