X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmessage.el;h=d2c15cd4356404feeb05f164114cb46bbe4d6c2d;hb=c0d7674c3cb02a31d3d2c0f240e44fb48827d3ab;hp=af8b0191ca1eed902f9ec1770089cbdf9f271467;hpb=24b976621c5ddd2e020a2b3a30b163b32f837890;p=gnus diff --git a/lisp/message.el b/lisp/message.el index af8b0191c..d2c15cd43 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -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,8 +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 'gmm-image-load-path "gmm-utils") (autoload 'message-setup-toolbar "messagexmas") (autoload 'mh-new-draft-name "mh-comp") (autoload 'mh-send-letter "mh-comp") @@ -4768,7 +4767,9 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'." (* 25 25))) (let ((tm (current-time))) (concat - (if (memq system-type '(ms-dos emx vax-vms)) + (if (or (memq system-type '(ms-dos emx vax-vms)) + ;; message-number-base36 doesn't handle bigints. + (floatp (user-uid))) (let ((user (downcase (user-login-name)))) (while (string-match "[^a-z0-9_]" user) (aset user (match-beginning 0) ?_)) @@ -6506,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. @@ -6543,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))) @@ -6716,8 +6719,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 @@ -6737,19 +6741,24 @@ 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 "mail/attach" mml-mode-map) - (ispell-message "spell" nil :visible (not flyspell-mode)) - (flyspell-buffer "spell" t :visible flyspell-mode - :help "Flyspell whole buffer") + (mml-attach-file "attach" mml-mode-map) (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). @@ -6793,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." @@ -6801,12 +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 "message" "mail/save-draft.xpm" - 'load-path)) - (image-load-path - (gmm-image-load-path "message" "mail/save-draft.xpm" - 'image-load-path))) + (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))))