From: yamaoka Date: Mon, 23 Jan 2006 22:07:05 +0000 (+0000) Subject: Synch to No Gnus 200601231604. X-Git-Tag: t-gnus-6_17_4-quimby-~140 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51ed19ca8bfa5fc1089f9d2d1eda4ad62e6255a4;p=elisp%2Fgnus.git- Synch to No Gnus 200601231604. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f391a8..b54ef7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2006-01-23 Reiner Steib + + * message.el (message-tool-bar-zap-list): Use + gmm-tool-bar-zap-list as custom type. + (message-tool-bar-update): New function. + (message-tool-bar, message-tool-bar-gnome) + (message-tool-bar-retro): Add message-tool-bar-update. + (message-tool-bar-gnome): Add flyspell-buffer. + + * gnus-util.el (gnus-error): Describe `args'. + + * gmm-utils.el (gmm-error): Describe `args'. + (gmm-tool-bar-zap-list): New widget. + (gmm-tool-bar-from-list): Improve description of `zap-list'. + 2006-01-23 Katsumi Yamaoka * mm-uu.el (mm-uu-buttonize-original-text-parts): New variable. diff --git a/lisp/gmm-utils.el b/lisp/gmm-utils.el index efe8fa0..c398368 100644 --- a/lisp/gmm-utils.el +++ b/lisp/gmm-utils.el @@ -62,7 +62,8 @@ inside loops." ;;;###autoload (defun gmm-error (level &rest args) - "Beep an error if LEVEL is equal to or less than `gmm-verbose'." + "Beep an error if LEVEL is equal to or less than `gmm-verbose'. +ARGS are passed to `message'." (when (<= (floor level) gmm-verbose) (apply 'message args) (ding) @@ -122,6 +123,37 @@ This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility." (sexp :tag "Other map")) (plist :inline t :tag "Properties"))) +;;;###autoload +(define-widget 'gmm-tool-bar-zap-list (if (gmm-widget-p 'lazy) 'lazy 'gmm-lazy) + "Tool bar zap list." + :tag "Tool bar zap list" + :type '(choice (const :tag "Zap all" t) + (const :tag "Keep all" nil) + (list + ;; :value + ;; Work around (bug in customize?), see + ;; + ;; (new-file open-file dired kill-buffer write-file + ;; print-buffer customize help) + (set :inline t + (const new-file) + (const open-file) + (const dired) + (const kill-buffer) + (const save-buffer) + (const write-file) + (const undo) + (const cut) + (const copy) + (const paste) + (const search-forward) + (const print-buffer) + (const customize) + (const help)) + (repeat :inline t + :tag "Other" + (symbol :tag "Icon item"))))) + (defvar tool-bar-map) ;;;###autoload @@ -136,7 +168,10 @@ and all following elements are passed a the PROPS argument to the function `tool-bar-local-item'. If ZAP-LIST is a list, remove those item from the default -`tool-bar-map'. If it is t, start with a new sparse map. +`tool-bar-map'. If it is t, start with a new sparse map. You +can use \\[describe-key] to find out the name of an icon +item. When \\[describe-key] shows \" +runs the command find-file\", then use `new-file' in ZAP-LIST. DEFAULT-MAP specifies the default key map for ICON-LIST." (let (;; For Emacs 21, we must let-bind `tool-bar-map'. In Emacs 22, we diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 8a65702..1b39509 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -478,7 +478,8 @@ inside loops." (apply 'format args))) (defun gnus-error (level &rest args) - "Beep an error if LEVEL is equal to or less than `gnus-verbose'." + "Beep an error if LEVEL is equal to or less than `gnus-verbose'. +ARGS are passed to `message'." (when (<= (floor level) gnus-verbose) (apply 'message args) (ding) diff --git a/lisp/message.el b/lisp/message.el index b4a9abc..89bf988 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -7423,22 +7423,18 @@ which specify the range to operate on." (defvar tool-bar-map) (defvar tool-bar-mode)) -(defcustom message-tool-bar-zap-list - '(new-file print-buffer kill-buffer save-buffer write-file dired - open-file customize help) - "List of icon items from the global tool bar. -These items are not displayed on the message mode tool bar. - -You can use \\[describe-key] to find out the name of a -icon item. Example: - - runs the command find-file - -Then use `new-file'." - :type '(choice (const :tag "Zap all" t) - (const :tag "Keep all" nil) - (repeat (symbol :tag "Icon item"))) - :group 'message) +;; Note: The :set function in the `message-tool-bar*' will only affect _new_ +;; message buffers. We might add a function that walks thru all message-mode +;; buffers and force the update. +(defun message-tool-bar-update (&optional symbol value) + "Update message mode toolbar. +Setter function for custom variables." + (if symbol + ;; When used as ":set" function: + (progn + (set-default symbol value) + (setq-default message-tool-bar-map nil)) + (message-make-tool-bar t))) ;; The default will be changed to `message-tool-bar-gnome' when the new icons ;; have been checked in: @@ -7456,6 +7452,9 @@ Pre-defined symbols include `message-tool-bar-gnome' and (const :tag "Retro look" message-tool-bar-retro) (repeat :tag "User defined list" gmm-tool-bar-item) (symbol)) + :version "23.0" ;; No Gnus + :initialize 'custom-initialize-default + :set 'message-tool-bar-update :group 'message) ;; The new icons are not yet committed, see @@ -7467,6 +7466,8 @@ Pre-defined symbols include `message-tool-bar-gnome' and (message-kill-buffer "close") ;; stock_cancel ;; (mml-attach-file "attach" mml-mode-map) (ispell-message "spell" nil :visible (not flyspell-mode)) + (flyspell-buffer "spell" t :visible flyspell-mode + :help "Flyspell whole buffer") ;; We should have a mail-preview icon with an envelope like the one in ;; stock_mail-reply. ;; (mml-preview "mail-preview" mml-mode-map) @@ -7480,6 +7481,8 @@ Pre-defined symbols include `message-tool-bar-gnome' and See `gmm-tool-bar-from-list' for details on the format of the list." :type '(repeat gmm-tool-bar-item) :version "23.0" ;; No Gnus + :initialize 'custom-initialize-default + :set 'message-tool-bar-update :group 'message) (defcustom message-tool-bar-retro @@ -7497,6 +7500,21 @@ See `gmm-tool-bar-from-list' for details on the format of the list." See `gmm-tool-bar-from-list' for details on the format of the list." :type '(repeat gmm-tool-bar-item) :version "23.0" ;; No Gnus + :initialize 'custom-initialize-default + :set 'message-tool-bar-update + :group 'message) + +(defcustom message-tool-bar-zap-list + '(new-file open-file dired kill-buffer write-file + print-buffer customize help) + "List of icon items from the global tool bar. +These items are not displayed on the message mode tool bar. + +See `gmm-tool-bar-from-list' for the format of the list." + :type 'gmm-tool-bar-zap-list + :version "23.0" ;; No Gnus + :initialize 'custom-initialize-default + :set 'message-tool-bar-update :group 'message) (defun message-make-tool-bar (&optional force)