summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2005-11-20 03:31:11 +0000
committerChong Yidong <cyd@stupidchicken.com>2005-11-20 03:31:11 +0000
commitf129a4dfe3ec1402c9b0634afd9d7b6baf247bce (patch)
treeacd0175de1dd95715cb316dada8b1903bd6b775b /lisp/gnus
parentc003141f4c934c5437e2a6313782add05da82694 (diff)
downloademacs-f129a4dfe3ec1402c9b0634afd9d7b6baf247bce.tar.gz
message.el: Revert last changes.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/message.el175
2 files changed, 78 insertions, 101 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 10e5ba0dc88..fcffe7dce49 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
+2005-11-19 Chong Yidong <cyd@stupidchicken.com>
+
+ * message.el: Revert last changes.
+
2005-11-17 Chong Yidong <cyd@stupidchicken.com>
* message.el (message-courtesy-message)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 9a5f910290a..019b5bd4f07 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -141,11 +141,7 @@ mailbox format."
:group 'message-sending)
(defcustom message-courtesy-message
- (concat
- "The following message is a courtesy copy of an article"
- hard-newline
- "that has been posted to %s as well."
- hard-newline hard-newline)
+ "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n"
"*This is inserted at the start of a mailed copy of a posted message.
If the string contains the format spec \"%s\", the Newsgroups
the article has been posted to will be inserted there.
@@ -343,9 +339,7 @@ few false positives here."
;;; marking inserted text
(defcustom message-mark-insert-begin
- (concat
- "--8<---------------cut here---------------start------------->8---"
- hard-newline)
+ "--8<---------------cut here---------------start------------->8---\n"
"How to mark the beginning of some inserted text."
:version "22.1"
:type 'string
@@ -353,16 +347,14 @@ few false positives here."
:group 'message-various)
(defcustom message-mark-insert-end
- (concat
- "--8<---------------cut here---------------end--------------->8---"
- hard-newline)
+ "--8<---------------cut here---------------end--------------->8---\n"
"How to mark the end of some inserted text."
:version "22.1"
:type 'string
:link '(custom-manual "(message)Insertion Variables")
:group 'message-various)
-(defcustom message-archive-header "X-No-Archive: Yes"
+(defcustom message-archive-header "X-No-Archive: Yes\n"
"Header to insert when you don't want your article to be archived.
Archives \(such as groups.google.com\) respect this header."
:version "22.1"
@@ -426,8 +418,7 @@ for `message-cross-post-insert-note'."
:link '(custom-manual "(message)Various Message Variables")
:group 'message-various)
-(defcustom message-elide-ellipsis
- (concat hard-newline "[...]" hard-newline hard-newline)
+(defcustom message-elide-ellipsis "\n[...]\n\n"
"*The string which is inserted for elided text."
:type 'string
:link '(custom-manual "(message)Various Commands")
@@ -587,8 +578,7 @@ Done before generating the new subject of a forward."
:link '(custom-manual "(message)Insertion Variables")
:type 'regexp)
-(defcustom message-cancel-message
- (concat "I am canceling my own article." hard-newline)
+(defcustom message-cancel-message "I am canceling my own article.\n"
"Message to be inserted in the cancel message."
:group 'message-interface
:link '(custom-manual "(message)Canceling News")
@@ -1744,7 +1734,7 @@ see `message-narrow-to-headers-or-head'."
(goto-char (point-max))
(if (string-match "\n$" (car headers))
(insert (car headers))
- (insert (car headers) hard-newline)))))
+ (insert (car headers) ?\n)))))
(setq headers (cdr headers))))
(defmacro message-with-reply-buffer (&rest forms)
@@ -1851,7 +1841,7 @@ Leading \"Re: \" is not stripped by this function. Use the function
(insert (concat "Subject: "
new-subject
" (was: "
- old-subject ")" hard-newline)))))))))
+ old-subject ")\n")))))))))
(defun message-mark-inserted-region (beg end)
"Mark some region in the current article with enclosing tags.
@@ -1935,7 +1925,7 @@ With prefix-argument just set Follow-Up, don't cross-post."
target-group
"[ \t]*$")
(message-fetch-field "Newsgroups")))
- (insert (concat hard-newline "Followup-To: " target-group)))
+ (insert (concat "\nFollowup-To: " target-group)))
(setq message-cross-post-old-target target-group))
(defun message-cross-post-insert-note (target-group cross-post in-old
@@ -1967,8 +1957,8 @@ been made to before the user asked for a Crosspost."
(if (or in-old
(not cross-post)
(string-match "^[ \t]*poster[ \t]*$" target-group))
- (insert message-followup-to-note target-group hard-newline)
- (insert message-cross-post-note target-group hard-newline))))
+ (insert (concat message-followup-to-note target-group "\n"))
+ (insert (concat message-cross-post-note target-group "\n")))))
(defun message-cross-post-followup-to (target-group)
"Crossposts message and set Followup-To to TARGET-GROUP.
@@ -2028,7 +2018,7 @@ With prefix-argument just set Follow-Up, don't cross-post."
(save-excursion
(message-goto-to)
(message-delete-line)
- (insert (concat "To: " cc-content hard-newline))
+ (insert (concat "To: " cc-content "\n"))
(save-restriction
(message-narrow-to-headers)
(message-remove-header (if bcc
@@ -2793,7 +2783,7 @@ or in the synonym headers, defined by `message-header-synonyms'."
(message-remove-header (symbol-name (car elem)))
(goto-char (point-min))
(insert (symbol-name (car elem)) ": "
- (cdr elem) hard-newline))))))
+ (cdr elem) "\n"))))))
(defun message-insert-newsgroups ()
"Insert the Newsgroups header from the article being replied to."
@@ -2823,7 +2813,7 @@ or in the synonym headers, defined by `message-header-synonyms'."
(point)
(forward-line -2)
(point)))
- (insert hard-newline)
+ (insert "\n")
(goto-char beg)
(delete-region beg (progn (message-goto-body)
(forward-line 2)
@@ -2842,7 +2832,7 @@ or in the synonym headers, defined by `message-header-synonyms'."
(end-of-line -1))
(kill-region point (point))
(unless (bolp)
- (insert hard-newline))))
+ (insert "\n"))))
(defun message-newline-and-reformat (&optional arg not-break)
"Insert four newlines, and then reformat if inside quoted text.
@@ -2984,15 +2974,15 @@ Prefix arg means justify as well."
(goto-char (point-max))
;; Insert the signature.
(unless (bolp)
- (insert hard-newline))
+ (insert "\n"))
(when message-signature-insert-empty-line
- (insert hard-newline))
- (insert "-- " hard-newline)
+ (insert "\n"))
+ (insert "-- \n")
(if (eq signature t)
(insert-file-contents message-signature-file)
(insert signature))
(goto-char (point-max))
- (or (bolp) (insert hard-newline)))))
+ (or (bolp) (insert "\n")))))
(defun message-insert-importance-high ()
"Insert header to mark message as important."
@@ -3002,7 +2992,7 @@ Prefix arg means justify as well."
(message-narrow-to-headers)
(message-remove-header "Importance"))
(message-goto-eoh)
- (insert "Importance: high" hard-newline)))
+ (insert "Importance: high\n")))
(defun message-insert-importance-low ()
"Insert header to mark message as unimportant."
@@ -3012,7 +3002,7 @@ Prefix arg means justify as well."
(message-narrow-to-headers)
(message-remove-header "Importance"))
(message-goto-eoh)
- (insert "Importance: low" hard-newline)))
+ (insert "Importance: low\n")))
(defun message-insert-or-toggle-importance ()
"Insert a \"Importance: high\" header, or cycle through the header values.
@@ -3034,7 +3024,7 @@ and `low'."
(t
"high")))))
(message-goto-eoh)
- (insert (format "Importance: %s" new) hard-newline))))
+ (insert (format "Importance: %s\n" new)))))
(defun message-insert-disposition-notification-to ()
"Request a disposition notification (return receipt) to this message.
@@ -3045,11 +3035,10 @@ Note that this should not be used in newsgroups."
(message-narrow-to-headers)
(message-remove-header "Disposition-Notification-To"))
(message-goto-eoh)
- (insert (format "Disposition-Notification-To: %s"
+ (insert (format "Disposition-Notification-To: %s\n"
(or (message-field-value "Reply-to")
(message-field-value "From")
- (message-make-from)))
- hard-newline)))
+ (message-make-from))))))
(defun message-elide-region (b e)
"Elide the text in the region.
@@ -3184,7 +3173,7 @@ However, if `message-yank-prefix' is non-nil, insert that prefix on each line."
;; Delete blank lines at the end of the buffer.
(goto-char (point-max))
(unless (eolp)
- (insert hard-newline))
+ (insert "\n"))
(while (and (zerop (forward-line -1))
(looking-at "$"))
(message-delete-line))
@@ -3222,7 +3211,7 @@ prefix, and don't delete any headers."
(funcall message-cite-function))
(message-exchange-point-and-mark)
(unless (bolp)
- (insert hard-newline))
+ (insert ?\n))
(unless modified
(setq message-checksum (message-checksum))))))
@@ -3280,13 +3269,13 @@ prefix, and don't delete any headers."
(delete-region (point) end)
(unless (search-backward "\n\n" start t)
;; Insert a blank line if it is peeled off.
- (insert hard-newline)))
+ (insert "\n")))
(goto-char start)
(while functions
(funcall (pop functions)))
(when message-citation-line-function
(unless (bolp)
- (insert hard-newline))
+ (insert "\n"))
(funcall message-citation-line-function))))
(eval-when-compile (defvar mail-citation-hook)) ;Compiler directive
@@ -3322,14 +3311,13 @@ prefix, and don't delete any headers."
(funcall (pop functions)))
(when message-citation-line-function
(unless (bolp)
- (insert hard-newline))
+ (insert "\n"))
(funcall message-citation-line-function)))))
(defun message-insert-citation-line ()
"Insert a simple citation line."
(when message-reply-headers
- (insert (mail-header-from message-reply-headers)
- " writes:" hard-newline hard-newline)))
+ (insert (mail-header-from message-reply-headers) " writes:\n\n")))
(defun message-position-on-field (header &rest afters)
(let ((case-fold-search t))
@@ -3355,7 +3343,7 @@ prefix, and don't delete any headers."
(when afters
(re-search-forward "^[^ \t]" nil 'move)
(beginning-of-line))
- (insert header ": " hard-newline)
+ (insert header ": \n")
(forward-char -1)
nil))))
@@ -3551,7 +3539,7 @@ It should typically alter the sending method in some way or other."
;; Make sure there's a newline at the end of the message.
(goto-char (point-max))
(unless (bolp)
- (insert hard-newline))
+ (insert "\n"))
;; Make the hidden headers visible.
(let ((points (message-text-with-property 'message-hidden)))
(when points
@@ -3656,7 +3644,7 @@ It should typically alter the sending method in some way or other."
(goto-char (point-min))
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n"))
- (replace-match hard-newline)
+ (replace-match "\n")
(run-hooks 'message-send-mail-hook)
(let ((p (goto-char (point-min)))
(tembuf (message-generate-new-buffer-clone-locals " message temp"))
@@ -3698,18 +3686,17 @@ It should typically alter the sending method in some way or other."
(message-remove-header "Message-ID")
(message-remove-header "Lines")
(goto-char (point-max))
- (insert "Mime-Version: 1.0" hard-newline)
+ (insert "Mime-Version: 1.0\n")
(setq header (buffer-string)))
(goto-char (point-max))
- (insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d"
- id n total)
- hard-newline hard-newline)
+ (insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d\n\n"
+ id n total))
(forward-char -1)
(let ((mail-header-separator ""))
(when (memq 'Message-ID message-required-mail-headers)
- (insert "Message-ID: " (message-make-message-id) hard-newline))
+ (insert "Message-ID: " (message-make-message-id) "\n"))
(when (memq 'Lines message-required-mail-headers)
- (insert "Lines: " (message-make-lines) hard-newline))
+ (insert "Lines: " (message-make-lines) "\n"))
(message-goto-subject)
(end-of-line)
(insert (format " (%d/%d)" n total))
@@ -3774,7 +3761,7 @@ It should typically alter the sending method in some way or other."
(goto-char (point-max))
;; require one newline at the end.
(or (= (preceding-char) ?\n)
- (insert hard-newline))
+ (insert ?\n))
(message-cleanup-headers)
;; FIXME: we're inserting the courtesy copy after encoding.
;; This is wrong if the courtesy copy string contains
@@ -3850,7 +3837,7 @@ If you always want Gnus to send messages in one piece, set
(goto-char (point-min))
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n"))
- (replace-match hard-newline)
+ (replace-match "\n")
(backward-char 1)
(setq delimline (point-marker))
(run-hooks 'message-send-mail-hook)
@@ -3912,7 +3899,7 @@ to find out how to use this."
(goto-char (point-min))
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n"))
- (replace-match hard-newline)
+ (replace-match "\n")
(run-hooks 'message-send-mail-hook)
;; send the message
(case
@@ -4080,13 +4067,13 @@ Otherwise, generate and save a value for `canlock-password' first."
(goto-char (point-max))
;; require one newline at the end.
(or (= (preceding-char) ?\n)
- (insert hard-newline))
+ (insert ?\n))
(let ((case-fold-search t))
;; Remove the delimiter.
(goto-char (point-min))
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n"))
- (replace-match hard-newline)
+ (replace-match "\n")
(backward-char 1))
(run-hooks 'message-send-news-hook)
(gnus-open-server method)
@@ -4213,7 +4200,7 @@ Otherwise, generate and save a value for `canlock-password' first."
(message-tokenize-header
newsgroups)))))))))
(goto-char (point-min))
- (insert "Followup-To: " to hard-newline))
+ (insert "Followup-To: " to "\n"))
t))
;; Check "Shoot me".
(message-check 'shoot
@@ -5112,7 +5099,7 @@ Headers already prepared in the buffer are not modified."
;; We check whether the value was ended by a
;; newline. If now, we insert one.
(unless (bolp)
- (insert hard-newline))
+ (insert "\n"))
(forward-line -1)))
;; The value of this header was empty, so we clear
;; totally and insert the new value.
@@ -5152,7 +5139,7 @@ Headers already prepared in the buffer are not modified."
(beginning-of-line))
(when (or (message-news-p)
(string-match "@.+\\.." secure-sender))
- (insert "Sender: " secure-sender hard-newline))))
+ (insert "Sender: " secure-sender "\n"))))
;; Check for IDNA
(message-idna-to-ascii-rhs))))
@@ -5164,7 +5151,7 @@ Headers already prepared in the buffer are not modified."
(message-narrow-to-headers)
(when (setq newsgroups (message-fetch-field "newsgroups"))
(goto-char (point-max))
- (insert "Posted-To: " newsgroups hard-newline)))
+ (insert "Posted-To: " newsgroups "\n")))
(forward-line 1)
(when message-courtesy-message
(cond
@@ -5183,7 +5170,7 @@ Headers already prepared in the buffer are not modified."
(insert (capitalize (symbol-name header))
": "
(if (consp value) (car value) value)
- hard-newline)
+ "\n")
(narrow-to-region (point-min) (1- (point-max)))
(let (quoted last)
(goto-char (point-min))
@@ -5197,7 +5184,7 @@ Headers already prepared in the buffer are not modified."
(progn
(save-excursion
(goto-char last)
- (insert hard-newline "\t"))
+ (insert "\n\t"))
(setq last (1+ (point))))
(setq last (1+ (point)))))
(setq quoted (not quoted)))
@@ -5223,7 +5210,7 @@ If the current line has `message-yank-prefix', insert it on the new line."
(insert (capitalize (symbol-name header))
": "
(if (consp value) (car value) value)
- hard-newline)
+ "\n")
(save-restriction
(narrow-to-region begin (point))
(fill-region-as-paragraph begin (point))
@@ -5292,7 +5279,7 @@ than 988 characters long, and if they are not, trim them until they are."
(let ((refstring (mapconcat #'identity refs " ")))
(if (and message-this-is-news message-cater-to-broken-inn)
(insert (capitalize (symbol-name header)) ": "
- refstring hard-newline)
+ refstring "\n")
(message-fill-header header refstring)))))
(defun message-position-point ()
@@ -5521,18 +5508,18 @@ are not included."
(delete-region (point) (progn (forward-line -1) (point)))
(when message-default-headers
(insert message-default-headers)
- (or (bolp) (insert hard-newline)))
+ (or (bolp) (insert ?\n)))
(put-text-property
(point)
(progn
- (insert mail-header-separator hard-newline)
+ (insert mail-header-separator "\n")
(1- (point)))
'read-only nil)
(forward-line -1)
(when (message-news-p)
(when message-default-news-headers
(insert message-default-news-headers)
- (or (bolp) (insert hard-newline)))
+ (or (bolp) (insert ?\n)))
(when message-generate-headers-first
(message-generate-headers
(message-headers-to-generate
@@ -5543,7 +5530,7 @@ are not included."
(when (message-mail-p)
(when message-default-mail-headers
(insert message-default-mail-headers)
- (or (bolp) (insert hard-newline)))
+ (or (bolp) (insert ?\n)))
(save-restriction
(message-narrow-to-headers)
(if message-alternative-emails
@@ -6025,14 +6012,14 @@ If ARG, allow editing of the cancellation message."
(message-news)
(setq buf (set-buffer (get-buffer-create " *message cancel*"))))
(erase-buffer)
- (insert "Newsgroups: " newsgroups hard-newline
- "From: " from hard-newline
- "Subject: cmsg cancel " message-id hard-newline
- "Control: cancel " message-id hard-newline
+ (insert "Newsgroups: " newsgroups "\n"
+ "From: " from "\n"
+ "Subject: cmsg cancel " message-id "\n"
+ "Control: cancel " message-id "\n"
(if distribution
- (concat "Distribution: " distribution hard-newline)
+ (concat "Distribution: " distribution "\n")
"")
- mail-header-separator hard-newline
+ mail-header-separator "\n"
message-cancel-message)
(run-hooks 'message-cancel-hook)
(unless arg
@@ -6221,9 +6208,7 @@ Optional DIGEST will use digest to forward."
(defun message-forward-make-body-plain (forward-buffer)
(insert
- hard-newline
- "-------------------- Start of forwarded message --------------------"
- hard-newline)
+ "\n-------------------- Start of forwarded message --------------------\n")
(let ((b (point)) e)
(insert
(with-temp-buffer
@@ -6239,9 +6224,7 @@ Optional DIGEST will use digest to forward."
(buffer-string)))
(setq e (point))
(insert
- hard-newline
- "-------------------- End of forwarded message --------------------"
- hard-newline)
+ "\n-------------------- End of forwarded message --------------------\n")
(when message-forward-ignored-headers
(save-restriction
(narrow-to-region b e)
@@ -6251,10 +6234,7 @@ Optional DIGEST will use digest to forward."
(message-remove-header message-forward-ignored-headers t)))))
(defun message-forward-make-body-mime (forward-buffer)
- (insert
- hard-newline hard-newline
- "<#part type=message/rfc822 disposition=inline raw=t>"
- hard-newline)
+ (insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n")
(let ((b (point)) e)
(save-restriction
(narrow-to-region (point) (point))
@@ -6264,13 +6244,10 @@ Optional DIGEST will use digest to forward."
(replace-match "X-From-Line: "))
(goto-char (point-max)))
(setq e (point))
- (insert "<#/part>" hard-newline)))
+ (insert "<#/part>\n")))
(defun message-forward-make-body-mml (forward-buffer)
- (insert
- hard-newline hard-newline
- "<#mml type=message/rfc822 disposition=inline>"
- hard-newline)
+ (insert "\n\n<#mml type=message/rfc822 disposition=inline>\n")
(let ((b (point)) e)
(if (not message-forward-decoded-p)
(insert
@@ -6293,7 +6270,7 @@ Optional DIGEST will use digest to forward."
(replace-match "X-From-Line: "))
(goto-char (point-max))))
(setq e (point))
- (insert "<#/mml>" hard-newline)
+ (insert "<#/mml>\n")
(when (and (not message-forward-decoded-p)
message-forward-ignored-headers)
(save-restriction
@@ -6305,23 +6282,19 @@ Optional DIGEST will use digest to forward."
(defun message-forward-make-body-digest-plain (forward-buffer)
(insert
- hard-newline
- "-------------------- Start of forwarded message --------------------"
- hard-newline)
+ "\n-------------------- Start of forwarded message --------------------\n")
(let ((b (point)) e)
(mml-insert-buffer forward-buffer)
(setq e (point))
(insert
- hard-newline
- "-------------------- End of forwarded message --------------------"
- hard-newline)))
+ "\n-------------------- End of forwarded message --------------------\n")))
(defun message-forward-make-body-digest-mime (forward-buffer)
- (insert hard-newline "<#multipart type=digest>" hard-newline)
+ (insert "\n<#multipart type=digest>\n")
(let ((b (point)) e)
(insert-buffer-substring forward-buffer)
(setq e (point))
- (insert "<#/multipart>" hard-newline)
+ (insert "<#/multipart>\n")
(save-restriction
(narrow-to-region b e)
(goto-char b)
@@ -6826,7 +6799,7 @@ regexp VARSTR."
(message-narrow-to-headers-or-head)
(message-remove-header "Mime-Version")
(goto-char (point-max))
- (insert "MIME-Version: 1.0" hard-newline)
+ (insert "MIME-Version: 1.0\n")
(when lines
(insert lines))
(setq content-type-p
@@ -6846,7 +6819,7 @@ regexp VARSTR."
;; For unknown reason, MIME-Version doesn't exist.
(when (re-search-forward "^MIME-Version:" nil t)
(forward-line 1)
- (insert "Content-Type: text/plain; charset=us-ascii" hard-newline))))))
+ (insert "Content-Type: text/plain; charset=us-ascii\n"))))))
(defun message-read-from-minibuffer (prompt &optional initial-contents)
"Read from the minibuffer while providing abbrev expansion."
@@ -6875,7 +6848,7 @@ regexp VARSTR."
(pop emails))
(unless (or (not email) (equal email user-mail-address))
(goto-char (point-max))
- (insert "From: " email hard-newline))))
+ (insert "From: " email "\n"))))
(defun message-options-get (symbol)
(cdr (assq symbol message-options)))