:group 'message-buffers
:type '(choice function (const nil)))
+(defcustom message-cite-style nil
+ "The overall style to be used when yanking cited text.
+Values are either `traditional' (cited text first),
+`top-post' (cited text at the bottom), or nil (don't override the
+individual message variables)."
+ :version "24.1"
+ :group 'message-various
+ :type '(choice (const :tag "None" :value nil)
+ (const :tag "Traditional" :value traditional)
+ (const :tag "Top-post" :value top-post)))
+
(defcustom message-fcc-handler-function 'message-output
"*A function called to save outgoing articles.
This function will be called with the name of the file to store the
(defvar message-options nil
"Some saved answers when sending message.")
+;; 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.")
:link '(custom-manual "(message)Various Message Variables")
:type 'boolean)
-(defconst message-forbidden-properties
+(defvar message-forbidden-properties
;; No reason this should be clutter up customize. We make it a
;; property list (rather than a list of property symbols), to be
;; directly useful for `remove-text-properties'.
(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.
(funcall message-default-headers)
message-default-headers))
(or (bolp) (insert ?\n)))
- (let ((message-forbidden-properties nil))
- (insert (propertize (concat mail-header-separator "\n")
- 'read-only t 'rear-nonsticky t 'intangible t)))
+ (insert (concat mail-header-separator "\n"))
(forward-line -1)
;; If a crash happens while replying, the auto-save file would *not* have a
;; `References:' header if `message-generate-headers-first' was nil.
;; Therefore, always generate it first.
(let ((message-generate-headers-first
- (append message-generate-headers-first '(References))))
+ (if (eq message-generate-headers-first t)
+ t
+ (append message-generate-headers-first '(References)))))
(when (message-news-p)
(when message-default-news-headers
(insert message-default-news-headers)
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
(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 ""))
;; We first set up a normal mail buffer.
(unless (message-mail-user-agent)
(set-buffer (get-buffer-create " *message resend*"))
- (erase-buffer))
+ (let ((inhibit-read-only t))
+ (erase-buffer)))
(let ((message-this-is-mail t)
message-generate-hashcash
message-setup-hook)
(insert "Resent-"))
(widen)
(forward-line)
- (delete-region (point) (point-max))
+ (let ((inhibit-read-only t))
+ (delete-region (point) (point-max)))
(setq beg (point))
;; Insert the message to be resent.
(insert-buffer-substring cur)