all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* replace default tool-bar by home-grown tool-bar
@ 2007-12-18 19:04 matthias
  2007-12-18 21:15 ` Nick Roberts
       [not found] ` <mailman.5177.1198012545.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: matthias @ 2007-12-18 19:04 UTC (permalink / raw)
  To: help-gnu-emacs

Hi there,

i am meditating over chapter 22.17 from the Emacs Lisp-manual for a 
while and couldn't really get a hint on how to have my own tool-bar. I 
understand how to define a keymap that describes the tool-bar but how do 
i tell emacs to use my keymap? Maybe it is too obvious, but i can't 
figure it out...
I didn't find any hooks for the tool-bar. While they are used so 
frequently i wonder why there is none in this case. Wouldn't it be a 
good idea to have one that defines all the buttons in the tool-bar?
If you can point me to a very simple example that would be nice.

thanks in advance
matthias

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: replace default tool-bar by home-grown tool-bar
  2007-12-18 19:04 replace default tool-bar by home-grown tool-bar matthias
@ 2007-12-18 21:15 ` Nick Roberts
       [not found] ` <mailman.5177.1198012545.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Nick Roberts @ 2007-12-18 21:15 UTC (permalink / raw)
  To: matthias; +Cc: help-gnu-emacs

 > i am meditating over chapter 22.17 from the Emacs Lisp-manual for a 
 > while and couldn't really get a hint on how to have my own tool-bar. I 
 > understand how to define a keymap that describes the tool-bar but how do 
 > i tell emacs to use my keymap? Maybe it is too obvious, but i can't 
 > figure it out...

22.17.6 says (for edition 2.9, GNU Emacs version 23.0.50 but that
for 22.1 is probably the same) :

                                              Major modes may replace
     the global bar completely by making `tool-bar-map' buffer-local
     and set to a keymap containing only the desired items.  Info mode
     provides an example.

Looking at info.el:

  (set (make-local-variable 'tool-bar-map) info-tool-bar-map)

and info-tool-bar-map is created using tool-bar-local-item-from-menu

Is that not clear?

 > I didn't find any hooks for the tool-bar. While they are used so 
 > frequently i wonder why there is none in this case. Wouldn't it be a 
 > good idea to have one that defines all the buttons in the tool-bar?
 > If you can point me to a very simple example that would be nice.

gud.el provides another example.

-- 
Nick                                           http://www.inet.net.nz/~nickrob

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: replace default tool-bar by home-grown tool-bar
       [not found] ` <mailman.5177.1198012545.18990.help-gnu-emacs@gnu.org>
@ 2007-12-19  9:49   ` Matthias Pfeifer
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Pfeifer @ 2007-12-19  9:49 UTC (permalink / raw)
  To: help-gnu-emacs

Nick Roberts wrote:

> 22.17.6 says (for edition 2.9, GNU Emacs version 23.0.50 but that
> for 22.1 is probably the same) :
> 
>                                               Major modes may replace
>      the global bar completely by making `tool-bar-map' buffer-local
>      and set to a keymap containing only the desired items.  Info mode
>      provides an example.
> 
> Looking at info.el:
> 
>   (set (make-local-variable 'tool-bar-map) info-tool-bar-map)
> 
> and info-tool-bar-map is created using tool-bar-local-item-from-menu
> 
> Is that not clear?
> 

Thanks for your answer and for the pointer to gud.el. The section you
stated is of course clear. Only it seems a little unrelated since it is
not talking about a global tool-bar.

matthias

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-19  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18 19:04 replace default tool-bar by home-grown tool-bar matthias
2007-12-18 21:15 ` Nick Roberts
     [not found] ` <mailman.5177.1198012545.18990.help-gnu-emacs@gnu.org>
2007-12-19  9:49   ` Matthias Pfeifer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.