unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: tool-bar-setup overwrites local tool-bar-map
Date: Mon, 01 May 2006 00:19:56 -0400	[thread overview]
Message-ID: <E1FaPt6-00043J-T6@fencepost.gnu.org> (raw)
In-Reply-To: <30570.1146421414@olgas.newt.com> (message from Bill Wohler on Sun, 30 Apr 2006 11:23:34 -0700)

    If one runs tool-bar-mode first, and then MH-E, one sees the one pair of
    Preferences/Help buttons (the ones defined by MH-E). If vice-versa, one
    sees *two* pairs of Preferences/Help buttons (the ones defined by MH-E
    plus the ones defined by tool-bar).

Now I understand the point of your patch.
But it seems to me that ALL the standard tool-bar items
ought to be added to the standard tool-bar map.
Not just Help and Preferences.

Ah, now I see.  All the rest are added using
tool-bar-add-item-from-menu, which uses (default-value 'tool-bar-map).

So I believe your patch is correct.  But I think this is cleaner.
Does it work?


*** tool-bar.el	07 Feb 2006 18:16:16 -0500	1.5
--- tool-bar.el	30 Apr 2006 23:58:17 -0400	
***************
*** 267,280 ****
    ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose")
  
    (tool-bar-add-item-from-menu 'print-buffer "print")
-   (tool-bar-add-item "preferences" 'customize 'customize
- 		     :help "Edit preferences (customize)")
  
!   (tool-bar-add-item "help" (lambda ()
! 			      (interactive)
! 			      (popup-menu menu-bar-help-menu))
! 		     'help
! 		     :help "Pop up the Help menu")
    )
  
  (provide 'tool-bar)
--- 267,286 ----
    ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose")
  
    (tool-bar-add-item-from-menu 'print-buffer "print")
  
!   ;; tool-bar-add-item-from-menu itself operates on
!   ;; (default-value 'tool-bar-map), but when we don't use that function,
!   ;; we must explicitly operate on the default value.
! 
!   (let ((tool-bar-map (default-value 'tool-bar-map)))
!     (tool-bar-add-item "preferences" 'customize 'customize
! 		       :help "Edit preferences (customize)")
! 
!     (tool-bar-add-item "help" (lambda ()
! 				(interactive)
! 				(popup-menu menu-bar-help-menu))
! 		       'help
! 		       :help "Pop up the Help menu"))
    )
  
  (provide 'tool-bar)

  reply	other threads:[~2006-05-01  4:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <31860.1145577819@olgas.newt.com>
2006-04-21  0:44 ` tool-bar-setup overwrites local tool-bar-map Bill Wohler
     [not found] ` <423.1145580259@olgas.newt.com>
2006-04-30  3:04   ` Richard Stallman
2006-04-30 18:23     ` Bill Wohler
2006-05-01  4:19       ` Richard Stallman [this message]
2006-05-01  6:16         ` Bill Wohler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1FaPt6-00043J-T6@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).