summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-dired.el
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2009-02-25 04:20:32 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2009-02-25 04:20:32 +0000
commit87202be1092491092032d55362f050ea8fc8aa76 (patch)
treef5cdb0490423b18250f0ad7babcb1e09f9599cb8 /lisp/gnus/gnus-dired.el
parent8a76755b738856ddd953f4514567ce583ae3b419 (diff)
downloademacs-87202be1092491092032d55362f050ea8fc8aa76.tar.gz
(toplevel): Remove autoload for gnus-setup-message.
(gnus-dired-attach): Fake this-command value to prevent Gnus from displaying Gnus logo; always use compose-mail.
Diffstat (limited to 'lisp/gnus/gnus-dired.el')
-rw-r--r--lisp/gnus/gnus-dired.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/gnus/gnus-dired.el b/lisp/gnus/gnus-dired.el
index 0ad5ed1887d..a610991df68 100644
--- a/lisp/gnus/gnus-dired.el
+++ b/lisp/gnus/gnus-dired.el
@@ -53,7 +53,6 @@
;; Autoloads to avoid byte-compiler warnings. These are used only if the user
;; customizes `gnus-dired-mail-mode' to use Message and/or Gnus.
(autoload 'message-buffers "message")
-(autoload 'gnus-setup-message "gnus-msg" nil nil 'macro)
(autoload 'gnus-print-buffer "gnus-sum")
(defvar gnus-dired-mode nil
@@ -162,9 +161,17 @@ filenames."
bufs)
nil t)))
;; setup a new mail composition buffer
- (if (eq gnus-dired-mail-mode 'gnus-user-agent)
- (gnus-setup-message 'message (message-mail))
- ;; FIXME: Is this the right thing?
+ (let ((mail-user-agent gnus-dired-mail-mode)
+ ;; A workaround to prevent Gnus from displaying the Gnus
+ ;; logo when invoking this command without loading Gnus.
+ ;; Gnus demonstrates it when gnus.elc is being loaded if
+ ;; a command of which the name is prefixed with "gnus"
+ ;; causes that autoloading. See the code in question,
+ ;; that is the one first found in gnus.el by performing
+ ;; `C-s this-command'.
+ (this-command (if (eq gnus-dired-mail-mode 'gnus-user-agent)
+ 'gnoose-dired-attach
+ this-command)))
(compose-mail))
(setq destination (current-buffer)))