aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-22 20:23:53 +0000
committerRichard M. Stallman1997-07-22 20:23:53 +0000
commit374bda6bbd6a2e40ca31061d45660e570e545d80 (patch)
treec9974da2d9da79c777b0129013e594ccd5cdb967
parentcaf4bf368f156779c2186366427712fccc255121 (diff)
downloademacs-374bda6bbd6a2e40ca31061d45660e570e545d80.tar.gz
emacs-374bda6bbd6a2e40ca31061d45660e570e545d80.zip
(mail-indent-citation): Undo previous change.
Instead, convert region-end to a marker before the loop. (mail-yank-original, mail-yank-region): Undo previous change.
-rw-r--r--lisp/mail/sendmail.el25
1 files changed, 11 insertions, 14 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 19cfb4864e5..6fe9349f622 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1011,26 +1011,23 @@ Numeric argument means justify as well."
1011 justifyp 1011 justifyp
1012 t))) 1012 t)))
1013 1013
1014(defun mail-indent-citation (beg end) 1014(defun mail-indent-citation ()
1015 "Modify text just inserted from a message to be cited. 1015 "Modify text just inserted from a message to be cited.
1016The inserted text should be the region. 1016The inserted text should be the region.
1017When this function returns, the region is again around the modified text. 1017When this function returns, the region is again around the modified text.
1018 1018
1019Normally, indent each nonblank line `mail-indentation-spaces' spaces. 1019Normally, indent each nonblank line `mail-indentation-spaces' spaces.
1020However, if `mail-yank-prefix' is non-nil, insert that prefix on each line." 1020However, if `mail-yank-prefix' is non-nil, insert that prefix on each line."
1021 (if (> beg end) 1021 (mail-yank-clear-headers (region-beginning) (region-end))
1022 (let ((temp beg))
1023 (setq beg end end temp)))
1024 (mail-yank-clear-headers beg end)
1025 (if (null mail-yank-prefix) 1022 (if (null mail-yank-prefix)
1026 (indent-rigidly beg end mail-indentation-spaces) 1023 (indent-rigidly (region-beginning) (region-end)
1024 mail-indentation-spaces)
1027 (save-excursion 1025 (save-excursion
1028 (goto-char beg) 1026 (let ((end (set-marker (make-marker) (region-end))))
1029 (setq end (set-marker (make-marker) end)) 1027 (goto-char (region-beginning))
1030 (while (< (point) end) 1028 (while (< (point) end)
1031 (insert mail-yank-prefix) 1029 (insert mail-yank-prefix)
1032 (forward-line 1)) 1030 (forward-line 1))))))
1033 (set-marker end nil))))
1034 1031
1035(defun mail-yank-original (arg) 1032(defun mail-yank-original (arg)
1036 "Insert the message being replied to, if any (in rmail). 1033 "Insert the message being replied to, if any (in rmail).
@@ -1062,7 +1059,7 @@ and don't delete any header fields."
1062 (run-hooks 'mail-citation-hook) 1059 (run-hooks 'mail-citation-hook)
1063 (if mail-yank-hooks 1060 (if mail-yank-hooks
1064 (run-hooks 'mail-yank-hooks) 1061 (run-hooks 'mail-yank-hooks)
1065 (mail-indent-citation (point) (mark)))))) 1062 (mail-indent-citation)))))
1066 ;; This is like exchange-point-and-mark, but doesn't activate the mark. 1063 ;; This is like exchange-point-and-mark, but doesn't activate the mark.
1067 ;; It is cleaner to avoid activation, even though the command 1064 ;; It is cleaner to avoid activation, even though the command
1068 ;; loop would deactivate the mark because we inserted text. 1065 ;; loop would deactivate the mark because we inserted text.
@@ -1115,7 +1112,7 @@ and don't delete any header fields."
1115 (run-hooks 'mail-citation-hook) 1112 (run-hooks 'mail-citation-hook)
1116 (if mail-yank-hooks 1113 (if mail-yank-hooks
1117 (run-hooks 'mail-yank-hooks) 1114 (run-hooks 'mail-yank-hooks)
1118 (mail-indent-citation (point) (mark))))))))) 1115 (mail-indent-citation))))))))
1119 1116
1120(defun mail-attach-file (&optional file) 1117(defun mail-attach-file (&optional file)
1121 "Insert a file at the end of the buffer, with separator lines around it." 1118 "Insert a file at the end of the buffer, with separator lines around it."