Thanks for your help. If I add your patch below to my .emacs I get
Debugger entered--Lisp error: (wrong-type-argument listp "Recent")
The grep.el example that Eli mentioned is not that straightforward. Well, I'm not a lisp techie but maybe I'll look at it again this weekend.
Best,
Bernhard
On 24 Oct 2008, at 20:36, Bernhard Koenig wrote:It's perfectly possible. I have it in Aquamacs, and it just took me a bit of Lisp code. The full code is in aquamacs-tool-bar.el if you want to look it up. Specifically, this is what does it:
you get a list of "recent files". In Emacs, even with the recentf
extension, it seems impossible to add a "recentf-open-files" icon to
the toolbar. Of course you can use keybindings, but some people like
the mouse and the "recent files" in the menubar require more clicks.
(tool-bar-add-item '("history" . "Recent") (lambda ()
(interactive)
(popup-menu (easy-menu-filter-return
(recentf-make-menu-items)
"Open Recent")))
'recent-files
:visible '(and (boundp 'recentf-mode) recentf-mode)
:help "Pop up the Recent Files menu")