<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 26 nov. 2011, at 14:28, Nathaniel Cunningham wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello Alan,<br><br><div class="gmail_quote">On Thu, Nov 24, 2011 at 10:17 AM, Alan Schmitt <span dir="ltr"><<a href="mailto:alan.schmitt@polytechnique.org" target="_blank">alan.schmitt@polytechnique.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
<br>
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).<br>
<br>
(defun recentf-ido-find-file ()<br>
  "Find a recent file using Ido."<br>
  (interactive)<br>
  (let ((file (ido-completing-read "Choose recent file: " recentf-list nil t)))<br>
    (when file<br>
      (find-file file))))<br>
<br>
(global-set-key "\C-x\C-r" 'recentf-ido-find-file)<br>
<br>
If I evaluate the last line, then everything goes well.<br>
<br>
Where should I put the rebinding so that it overrides the default one?</blockquote><div><br>Putting your new function & binding command at the end of Preferences.el works fine for me.  Aquamacs 2.4.<br></div></div></blockquote></div><br><div>I'm also using Aquamacs 2.4. I tried again, and when I do C-x C-r I get the menu and not my function.</div><div><br></div><div>Is there a way to debug the startup sequence of Aquamacs so that I find how the binding gets overridden?</div><div><br></div><div>Thanks,</div><div><br></div><div>Alan</div></body></html>