X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmessage.el;h=a6e007a07b0a18719d234e661a19527b69d8f8d6;hb=554522c045d2306eca66e7407fb9797ae722d35e;hp=46c25c8574976cb0280e804d8e5959ddf155fdd1;hpb=d79ddad8e47423c8c5acf5c7bfa95476cd89dfbe;p=gnus diff --git a/lisp/message.el b/lisp/message.el index 46c25c857..a6e007a07 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1858,7 +1858,12 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'." (defvar message-options nil "Some saved answers when sending message.") -(make-local-variable 'message-options) +;; FIXME: On XEmacs this causes problems since let-binding like: +;; (let ((message-options message-options)) ...) +;; as in `message-send' and `mml-preview' loses to buffer-local +;; variable initialization. +(unless (featurep 'xemacs) + (make-variable-buffer-local 'message-options)) (defvar message-send-mail-real-function nil "Internal send mail function.") @@ -4055,11 +4060,11 @@ Instead, just auto-save the buffer and then bury it." (defun message-bury (buffer) "Bury this mail BUFFER." - (let ((newbuf (other-buffer buffer))) - (bury-buffer buffer) - (if message-return-action - (apply (car message-return-action) (cdr message-return-action)) - (switch-to-buffer newbuf)))) + (if message-return-action + (progn + (bury-buffer buffer) + (apply (car message-return-action) (cdr message-return-action))) + (with-current-buffer buffer (bury-buffer)))) (defun message-send (&optional arg) "Send the message in the current buffer. @@ -6823,7 +6828,7 @@ Useful functions to put in this list include: subject) ;;;###autoload -(defun message-reply (&optional to-address wide) +(defun message-reply (&optional to-address wide switch-function) "Start editing a reply to the article in the current buffer." (interactive) (require 'gnus-sum) ; for gnus-list-identifiers @@ -6866,7 +6871,8 @@ Useful functions to put in this list include: (message-pop-to-buffer (message-buffer-name (if wide "wide reply" "reply") from - (if wide to-address nil)))) + (if wide to-address nil)) + switch-function)) (setq message-reply-headers (vector 0 subject from date message-id references 0 0 ""))