From: yamaoka Date: Tue, 17 Dec 2002 23:03:24 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_10-00-quimby~29 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df5b4052648ff96d56f9cf15de67bb84969312c0;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa78524..df34e13 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2002-12-17 Jesper Harder + + * lpath.el: Add tool-bar-local-item-from-menu. + + * message.el (message-tool-bar-local-item-from-menu): New function. + (message-tool-bar-map): Use it. + 2002-12-14 Jesper Harder * gnus-uu.el (gnus-uu-digest-headers): Mention nil value in docstring. diff --git a/lisp/lpath.el b/lisp/lpath.el index 2125666..df33e31 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -9,14 +9,15 @@ (defun maybe-bind (args) (mapcar (lambda (var) (unless (boundp var) (set var nil))) args)) -(maybe-fbind '(create-image - display-graphic-p display-time-event-handler find-image - image-size image-type-available-p insert-image - make-mode-line-mouse-map make-temp-file propertize put-image - replace-regexp-in-string rmail-msg-is-pruned +(maybe-fbind '(create-image display-graphic-p + display-time-event-handler find-image image-size + image-type-available-p insert-image + make-mode-line-mouse-map make-temp-file propertize + put-image replace-regexp-in-string rmail-msg-is-pruned rmail-msg-restore-non-pruned-header sort-coding-systems tool-bar-add-item tool-bar-add-item-from-menu - vcard-pretty-print w32-focus-frame w3m-charset-to-coding-system + tool-bar-local-item-from-menu vcard-pretty-print + w32-focus-frame w3m-charset-to-coding-system x-focus-frame)) (maybe-bind '(filladapt-mode mc-pgp-always-sign rmail-enable-mime-composing diff --git a/lisp/message.el b/lisp/message.el index dca6038..d276b55 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -6555,6 +6555,14 @@ which specify the range to operate on." (defvar tool-bar-map) (defvar tool-bar-mode)) +(defun message-tool-bar-local-item-from-menu (command icon in-map &optional from-map &rest props) + ;; We need to make tool bar entries in local keymaps with + ;; `tool-bar-local-item-from-menu' in Emacs > 21.3 + (if (fboundp 'tool-bar-local-item-from-menu) + ;; This is for Emacs 21.3 + (tool-bar-local-item-from-menu command icon in-map from-map props) + (tool-bar-add-item-from-menu command icon from-map props))) + (defun message-tool-bar-map () (or message-tool-bar-map (setq message-tool-bar-map @@ -6569,25 +6577,25 @@ which specify the range to operate on." (dolist (key '(print-buffer kill-buffer save-buffer write-file dired open-file)) (define-key tool-bar-map (vector key) nil)) - (tool-bar-add-item-from-menu - 'message-send-and-exit "mail_send" message-mode-map) - (tool-bar-add-item-from-menu - 'message-kill-buffer "close" message-mode-map) - (tool-bar-add-item-from-menu - 'message-dont-send "cancel" message-mode-map) - (tool-bar-add-item-from-menu - 'mime-edit-insert-file "attach" message-mode-map) - (tool-bar-add-item-from-menu - 'ispell-message "spell" message-mode-map) - (tool-bar-add-item-from-menu + (message-tool-bar-local-item-from-menu + 'message-send-and-exit "mail_send" tool-bar-map message-mode-map) + (message-tool-bar-local-item-from-menu + 'message-kill-buffer "close" tool-bar-map message-mode-map) + (message-tool-bar-local-item-from-menu + 'message-dont-send "cancel" tool-bar-map message-mode-map) + (message-tool-bar-local-item-from-menu + 'mime-edit-insert-file "attach" tool-bar-map message-mode-map) + (message-tool-bar-local-item-from-menu + 'ispell-message "spell" tool-bar-map message-mode-map) + (message-tool-bar-local-item-from-menu 'message-insert-importance-high "important" - message-mode-map) - (tool-bar-add-item-from-menu + tool-bar-map message-mode-map) + (message-tool-bar-local-item-from-menu 'message-insert-importance-low "unimportant" - message-mode-map) - (tool-bar-add-item-from-menu + tool-bar-map message-mode-map) + (message-tool-bar-local-item-from-menu 'message-insert-disposition-notification-to "receipt" - message-mode-map) + tool-bar-map message-mode-map) tool-bar-map))))) ;;; Group name completion.