X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmessage.el;h=c8a706e44dec9f0bb377ff64c9c5c4c26fa46dc6;hb=b2ea476e0bc6e2973976b376c15be5381fe3127f;hp=595a803fafbba3ec5109713912ea20d9ee6eb4cc;hpb=a314569677d5b1c7197c7bd335ddc685795be1e5;p=gnus diff --git a/lisp/message.el b/lisp/message.el index 595a803fa..c8a706e44 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -129,6 +129,17 @@ :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 @@ -1847,6 +1858,7 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'." (defvar message-options nil "Some saved answers when sending message.") +(make-variable-buffer-local 'message-options) (defvar message-send-mail-real-function nil "Internal send mail function.") @@ -2808,7 +2820,7 @@ message composition doesn't break too bad." :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'. @@ -4043,11 +4055,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. @@ -6444,15 +6456,15 @@ are not included." (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) @@ -6811,7 +6823,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 @@ -6854,7 +6866,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 "")) @@ -7473,7 +7486,8 @@ is for the internal use." ;; 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) @@ -7490,7 +7504,8 @@ is for the internal use." (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)