* gnus-nocem.el (gnus-nocem-scan-groups): Add autoload cookie; scan latest
[gnus] / lisp / message.el
index 829b968..0562908 100644 (file)
@@ -39,6 +39,7 @@
 (require 'canlock)
 (require 'mailheader)
 (require 'nnheader)
+(require 'gmm-utils)
 ;; This is apparently necessary even though things are autoloaded.
 ;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better
 ;; require mailabbrev here.
@@ -1663,7 +1664,6 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
   (autoload 'gnus-request-post "gnus-int")
   (autoload 'gnus-server-string "gnus")
   (autoload 'idna-to-ascii "idna")
-  (autoload 'gmm-tool-bar-from-list "gmm-utils")
   (autoload 'message-setup-toolbar "messagexmas")
   (autoload 'mh-new-draft-name "mh-comp")
   (autoload 'mh-send-letter "mh-comp")
@@ -3707,8 +3707,8 @@ not have PROP."
          (when (let ((char (char-after)))
                  (or (< (mm-char-int char) 128)
                      (and (mm-multibyte-p)
-                          ;; Fixme: Wrong for Emacs 23 and for things
-                          ;; like undecable utf-8.  Should at least
+                          ;; FIXME: Wrong for Emacs 23 (unicode) and for
+                          ;; things like undecable utf-8.  Should at least
                           ;; use find-coding-systems-region.
                           (memq (char-charset char)
                                 '(eight-bit-control eight-bit-graphic
@@ -6715,8 +6715,9 @@ Setter function for custom variables."
     ;; When used as ":set" function:
     (set-default symbol value)))
 
-;; The default will be changed when the new icons have been checked in:
-(defcustom message-tool-bar 'message-tool-bar-retro
+(defcustom message-tool-bar (if (eq gmm-tool-bar-style 'gnome)
+                               'message-tool-bar-gnome
+                             'message-tool-bar-retro)
   "Specifies the message mode tool bar.
 
 It can be either a list or a symbol refering to a list.  See
@@ -6735,24 +6736,21 @@ Pre-defined symbols include `message-tool-bar-gnome' and
   :set 'message-tool-bar-update
   :group 'message)
 
-;; The new icons are not yet committed, see
-;; http://thread.gmane.org/gmane.emacs.gnus.general/61719
 (defcustom message-tool-bar-gnome
   '((gmm-ignore "separator")
     (message-send-and-exit "mail/send")
     (message-dont-send "mail/save-draft")
     (message-kill-buffer "close") ;; stock_cancel
-    (mml-attach-file "mail/attach" mml-mode-map)
+    (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)
     (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil)
     (message-insert-importance-high "important" nil :visible nil)
     (message-insert-importance-low "unimportant" nil :visible nil)
     (message-insert-disposition-notification-to "receipt" nil :visible nil)
+    (gmm-customize-mode "preferences" t :help "Edit mode preferences")
     (message-info "help" t :help "Message manual"))
   "List of items for the message tool bar (GNOME style).
 
@@ -6764,15 +6762,16 @@ See `gmm-tool-bar-from-list' for details on the format of the list."
   :group 'message)
 
 (defcustom message-tool-bar-retro
-  '((message-send-and-exit "mail/send")
+  '(;; Old Emacs 21 icon for consistency.
+    (message-send-and-exit "gnus/mail_send")
     (message-kill-buffer "close")
     (message-dont-send "cancel")
     (mml-attach-file "attach" mml-mode-map)
     (ispell-message "spell")
     (mml-preview "preview" mml-mode-map)
-    (message-insert-importance-high "important")
-    (message-insert-importance-low "unimportant")
-    (message-insert-disposition-notification-to "receipt"))
+    (message-insert-importance-high "gnus/important")
+    (message-insert-importance-low "gnus/unimportant")
+    (message-insert-disposition-notification-to "gnus/receipt"))
   "List of items for the message tool bar (retro style).
 
 See `gmm-tool-bar-from-list' for details on the format of the list."
@@ -6804,11 +6803,13 @@ When FORCE, rebuild the tool bar."
             (or (not message-tool-bar-map) force))
     (setq message-tool-bar-map
          (let ((load-path
-                (gmm-image-load-path "message" "mail/save-draft.xpm"
-                                     'load-path))
+                (gmm-image-load-path-for-library "message"
+                                                 "mail/save-draft.xpm"
+                                                 nil t))
                (image-load-path
-                (gmm-image-load-path "message" "mail/save-draft.xpm"
-                                     'image-load-path)))
+                (gmm-image-load-path-for-library "message"
+                                                 "mail/save-draft.xpm"
+                                                 'image-load-path t)))
            (gmm-tool-bar-from-list message-tool-bar
                                    message-tool-bar-zap-list
                                    'message-mode-map))))