(message-tool-bar-gnome): Check if `flyspell-mode' is
[gnus] / lisp / message.el
index aeab4bd..d2c15cd 100644 (file)
@@ -4769,7 +4769,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'."
     (concat
      (if (or (memq system-type '(ms-dos emx vax-vms))
             ;; message-number-base36 doesn't handle bigints.
-            (float (user-uid)))
+            (floatp (user-uid)))
         (let ((user (downcase (user-login-name))))
           (while (string-match "[^a-z0-9_]" user)
             (aset user (match-beginning 0) ?_))
@@ -6507,6 +6507,7 @@ Optional DIGEST will use digest to forward."
        (set-buffer (get-buffer-create " *message resend*"))
        (erase-buffer))
       (let ((message-this-is-mail t)
+           message-generate-hashcash
            message-setup-hook)
        (message-setup `((To . ,address))))
       ;; Insert our usual headers.
@@ -6544,6 +6545,7 @@ Optional DIGEST will use digest to forward."
       ;; Send it.
       (let ((message-inhibit-body-encoding t)
            message-required-mail-headers
+           message-generate-hashcash
            rfc2047-encode-encoded-words)
        (message-send-mail))
       (kill-buffer (current-buffer)))
@@ -6739,14 +6741,18 @@ Pre-defined symbols include `message-tool-bar-gnome' and
   :group 'message)
 
 (defcustom message-tool-bar-gnome
-  '((gmm-ignore "separator")
+  '((ispell-message "spell" nil
+                   :visible (or (not (boundp 'flyspell-mode))
+                                (not flyspell-mode)))
+    (flyspell-buffer "spell" t
+                    :visible (and (boundp 'flyspell-mode)
+                                  flyspell-mode)
+                    :help "Flyspell whole buffer")
+    (gmm-ignore "separator")
     (message-send-and-exit "mail/send")
     (message-dont-send "mail/save-draft")
     (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")
     (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)
@@ -6796,6 +6802,8 @@ See `gmm-tool-bar-from-list' for the format of the list."
   :set 'message-tool-bar-update
   :group 'message)
 
+(defvar image-load-path)
+
 (defun message-make-tool-bar (&optional force)
   "Make a message mode tool bar from `message-tool-bar-list'.
 When FORCE, rebuild the tool bar."
@@ -6804,14 +6812,13 @@ When FORCE, rebuild the tool bar."
             tool-bar-mode
             (or (not message-tool-bar-map) force))
     (setq message-tool-bar-map
-         (let ((load-path
-                (gmm-image-load-path-for-library "message"
-                                                 "mail/save-draft.xpm"
-                                                 nil t))
-               (image-load-path
-                (gmm-image-load-path-for-library "message"
-                                                 "mail/save-draft.xpm"
-                                                 'image-load-path t)))
+         (let* ((load-path
+                 (gmm-image-load-path-for-library "message"
+                                                  "mail/save-draft.xpm"
+                                                  nil t))
+                (image-load-path (cons (car load-path)
+                                       (when (boundp 'image-load-path)
+                                         image-load-path))))
            (gmm-tool-bar-from-list message-tool-bar
                                    message-tool-bar-zap-list
                                    'message-mode-map))))