[Top][All Lists]

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

Re: enhancement/wish

From: Bernhard Koenig
Subject: Re: enhancement/wish
Date: Tue, 28 Oct 2008 16:40:16 -0400

OK, I see that there is a command tool-bar-local-item but it's not
listed in http://www.gnu.org/software/emacs/elisp/html_node/Tool-Bar.html

I guess the syopsis is
tool-bar-local-item icon def key map &rest props
but what is "map" in the case of "LaTeX-mode-hook"? Or in case of the info mode?


On Tue, Oct 28, 2008 at 12:39 PM, Jan Djärv <address@hidden> wrote:
> Bernhard Koenig skrev:
>> Thanks Jan, that worked. Can I make it global? (It's currently showing
>> up in things like .zshrc, .emacs even in M-x shell but not in the
>> Latex environment.)
> I guess your latex environment has its own tool bar map.  You must find some
> hook for when that environment starts so you then can add your item to that
> tool bar map.  Normally the variable tool-bar-map should be made buffer
> local if some mode installs its own tool map.  See for example how
> lisp/progmodes/grep.el does it.
>        Jan D.
>> Bernhard
>> On Tue, Oct 28, 2008 at 3:29 AM, Jan D. <address@hidden> wrote:
>>> Bernhard Koenig skrev:
>>>> Yes, I did restart. I found a thread with a similar problem but I
>>>> don't know how to resolve it:
>>>> http://www.nabble.com/Ciao-on-Intel-Mac-td15000558.html
>>>> In this thread they define a new function ciao-setup-tool-bar-helper,
>>>> but I don't understand the syntax. The patch below gives me
>>>> (wrong-type-argument listp "Recent"), the same problem from the url.
>>> The syntax below is wrong. '("history" . "Recent") shall be replaced with
>>> a
>>> name of an icon file to use, such as "open".  See etc/images for
>>> available
>>> images.  You can of course add your own.
>>> Also note that you must have recentf-mode on to see the tool bar item.
>>>       Jan D.
>>>> Bernhard
>>>> On Tue, Oct 28, 2008 at 12:12 AM, Eli Zaretskii <address@hidden> wrote:
>>>>>> Date: Mon, 27 Oct 2008 19:38:29 -0400
>>>>>> From: "Bernhard Koenig" <address@hidden>
>>>>>> Cc: address@hidden
>>>>>>>  (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")
>>>>>> Sorry for being a noob here but how do I integrate this into .emacs?
>>>>>> "tool-bar-add-item" is not an interactive command so just adding it to
>>>>>> .emacs does nothing.
>>>>> ??? .emacs is not only for interactive commands.  If adding this to it
>>>>> does nothing, then something is wrong.
>>>>> You did restart Emacs after adding this, did you?

reply via email to

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