GNU bug report logs -
#12787
Toolbar regression from Emacs 23 to Emacs 24 -- Save As and Help no longer available
Previous Next
Reported by: jxa127 <at> verizon.net
Date: Fri, 2 Nov 2012 17:33:02 UTC
Severity: minor
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The "Save As" and "Help" buttons from the tool bar are no longer available in Emacs 24. This change was not identified in the News.
My attempts to replace them fail.
I make the following changes in tool-bar.el:
--------------------------------------------------------------
(defun tool-bar-setup ()
(setq tool-bar-separator-image-expression
(tool-bar--image-expression "separator"))
(tool-bar-add-item-from-menu 'find-file "new" nil :label "New File"
:vert-only t)
(tool-bar-add-item-from-menu 'menu-find-file-existing "open" nil
:label "Open" :vert-only t)
(tool-bar-add-item-from-menu 'dired "diropen" nil :vert-only t)
(tool-bar-add-item-from-menu 'kill-this-buffer "close" nil :vert-only t)
(tool-bar-add-item-from-menu 'save-buffer "save" nil
:label "Save")
;; ---> I add the ?Save As? button here:
(tool-bar-add-item-from-menu 'write-file "saveas" nil
:label "Save as")
(define-key-after (default-value 'tool-bar-map) [separator-1] menu-bar-separator)
(tool-bar-add-item-from-menu 'undo "undo" nil)
(define-key-after (default-value 'tool-bar-map) [separator-2] menu-bar-separator)
(tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut])
"cut" nil :vert-only t)
(tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy])
"copy" nil :vert-only t)
(tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste])
"paste" nil :vert-only t)
(define-key-after (default-value 'tool-bar-map) [separator-3] menu-bar-separator)
(tool-bar-add-item-from-menu 'isearch-forward "search"
nil :label "Search" :vert-only t)
;;(tool-bar-add-item-from-menu 'ispell-buffer "spell")
;; There's no icon appropriate for News and we need a command rather
;; than a lambda for Read Mail.
;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose")
;; ---> I uncomment the help button here:
;; Help button on a tool bar is rather non-standard...
(let ((tool-bar-map (default-value 'tool-bar-map)))
(tool-bar-add-item "help" (lambda ()
(interactive)
(popup-menu menu-bar-help-menu))
'help
:help "Pop up the Help menu"))
)
--------------------------------------------------------------
I save tool-bar.el, compile it to tool-bar.elc and then restart Emacs, but the buttons are not there.
I can evaluate portions of tool-bar.el to make the button appear during one session, but they will not appear at start-up.
Thank you,
Drew Ames
This bug report was last modified 12 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.