bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12787: Toolbar regression from Emacs 23 to Emacs 24 -- Save As and H


From: jxa127
Subject: bug#12787: Toolbar regression from Emacs 23 to Emacs 24 -- Save As and Help no longer available
Date: Fri, 02 Nov 2012 12:29:17 -0500 (CDT)

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





reply via email to

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