diff options
| author | Stefan Monnier | 2010-09-20 13:20:38 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-09-20 13:20:38 +0200 |
| commit | 1f7f45a51e50a353de59a2ed5339ee4733205fcf (patch) | |
| tree | 39e246a43c9c0951ec6cdd45ad0d3d3e06ece5e6 | |
| parent | 0097720d41e0c99856518c2c131922e716ec9f74 (diff) | |
| download | emacs-1f7f45a51e50a353de59a2ed5339ee4733205fcf.tar.gz emacs-1f7f45a51e50a353de59a2ed5339ee4733205fcf.zip | |
* lisp/mail/sendmail.el: Fix commenting convention.
(sendmail-send-it): Use line-beginning-position.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 126 |
2 files changed, 66 insertions, 63 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a43c267c932..ae4064bc04a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-09-20 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2010-09-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * mail/sendmail.el: Fix commenting convention. | ||
| 4 | (sendmail-send-it): Use line-beginning-position. | ||
| 5 | |||
| 3 | * help-fns.el (describe-variable): Add original value, if applicable. | 6 | * help-fns.el (describe-variable): Add original value, if applicable. |
| 4 | 7 | ||
| 5 | 2010-09-20 Juanma Barranquero <lekktu@gmail.com> | 8 | 2010-09-20 Juanma Barranquero <lekktu@gmail.com> |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index d802b75ee06..6356c0a4cd5 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -1096,23 +1096,23 @@ external program defined by `sendmail-program'." | |||
| 1096 | ;; Delete Resent-BCC ourselves | 1096 | ;; Delete Resent-BCC ourselves |
| 1097 | (if (save-excursion (beginning-of-line) | 1097 | (if (save-excursion (beginning-of-line) |
| 1098 | (looking-at "resent-bcc")) | 1098 | (looking-at "resent-bcc")) |
| 1099 | (delete-region (save-excursion (beginning-of-line) (point)) | 1099 | (delete-region (line-beginning-position) |
| 1100 | (save-excursion (end-of-line) (1+ (point)))))) | 1100 | (line-beginning-position 2)))) |
| 1101 | ;;; Apparently this causes a duplicate Sender. | 1101 | ;; Apparently this causes a duplicate Sender. |
| 1102 | ;;; ;; If the From is different than current user, insert Sender. | 1102 | ;; ;; If the From is different than current user, insert Sender. |
| 1103 | ;;; (goto-char (point-min)) | 1103 | ;; (goto-char (point-min)) |
| 1104 | ;;; (and (re-search-forward "^From:" delimline t) | 1104 | ;; (and (re-search-forward "^From:" delimline t) |
| 1105 | ;;; (progn | 1105 | ;; (progn |
| 1106 | ;;; (require 'mail-utils) | 1106 | ;; (require 'mail-utils) |
| 1107 | ;;; (not (string-equal | 1107 | ;; (not (string-equal |
| 1108 | ;;; (mail-strip-quoted-names | 1108 | ;; (mail-strip-quoted-names |
| 1109 | ;;; (save-restriction | 1109 | ;; (save-restriction |
| 1110 | ;;; (narrow-to-region (point-min) delimline) | 1110 | ;; (narrow-to-region (point-min) delimline) |
| 1111 | ;;; (mail-fetch-field "From"))) | 1111 | ;; (mail-fetch-field "From"))) |
| 1112 | ;;; (user-login-name)))) | 1112 | ;; (user-login-name)))) |
| 1113 | ;;; (progn | 1113 | ;; (progn |
| 1114 | ;;; (forward-line 1) | 1114 | ;; (forward-line 1) |
| 1115 | ;;; (insert "Sender: " (user-login-name) "\n"))) | 1115 | ;; (insert "Sender: " (user-login-name) "\n"))) |
| 1116 | ;; Don't send out a blank subject line | 1116 | ;; Don't send out a blank subject line |
| 1117 | (goto-char (point-min)) | 1117 | (goto-char (point-min)) |
| 1118 | (if (re-search-forward "^Subject:\\([ \t]*\n\\)+\\b" delimline t) | 1118 | (if (re-search-forward "^Subject:\\([ \t]*\n\\)+\\b" delimline t) |
| @@ -1179,9 +1179,9 @@ external program defined by `sendmail-program'." | |||
| 1179 | nil errbuf nil "-oi") | 1179 | nil errbuf nil "-oi") |
| 1180 | (and envelope-from | 1180 | (and envelope-from |
| 1181 | (list "-f" envelope-from)) | 1181 | (list "-f" envelope-from)) |
| 1182 | ;;; ;; Don't say "from root" if running under su. | 1182 | ;; ;; Don't say "from root" if running under su. |
| 1183 | ;;; (and (equal (user-real-login-name) "root") | 1183 | ;; (and (equal (user-real-login-name) "root") |
| 1184 | ;;; (list "-f" (user-login-name))) | 1184 | ;; (list "-f" (user-login-name))) |
| 1185 | (and mail-alias-file | 1185 | (and mail-alias-file |
| 1186 | (list (concat "-oA" mail-alias-file))) | 1186 | (list (concat "-oA" mail-alias-file))) |
| 1187 | (if mail-interactive | 1187 | (if mail-interactive |
| @@ -1714,48 +1714,48 @@ The seventh argument ACTIONS is a list of actions to take | |||
| 1714 | when the message is sent, we apply FUNCTION to ARGS. | 1714 | when the message is sent, we apply FUNCTION to ARGS. |
| 1715 | This is how Rmail arranges to mark messages `answered'." | 1715 | This is how Rmail arranges to mark messages `answered'." |
| 1716 | (interactive "P") | 1716 | (interactive "P") |
| 1717 | ;;; This is commented out because I found it was confusing in practice. | 1717 | ;; This is commented out because I found it was confusing in practice. |
| 1718 | ;;; It is easy enough to rename *mail* by hand with rename-buffer | 1718 | ;; It is easy enough to rename *mail* by hand with rename-buffer |
| 1719 | ;;; if you want to have multiple mail buffers. | 1719 | ;; if you want to have multiple mail buffers. |
| 1720 | ;;; And then you can control which messages to save. --rms. | 1720 | ;; And then you can control which messages to save. --rms. |
| 1721 | ;;; (let ((index 1) | 1721 | ;; (let ((index 1) |
| 1722 | ;;; buffer) | 1722 | ;; buffer) |
| 1723 | ;;; ;; If requested, look for a mail buffer that is modified and go to it. | 1723 | ;; ;; If requested, look for a mail buffer that is modified and go to it. |
| 1724 | ;;; (if noerase | 1724 | ;; (if noerase |
| 1725 | ;;; (progn | 1725 | ;; (progn |
| 1726 | ;;; (while (and (setq buffer | 1726 | ;; (while (and (setq buffer |
| 1727 | ;;; (get-buffer (if (= 1 index) "*mail*" | 1727 | ;; (get-buffer (if (= 1 index) "*mail*" |
| 1728 | ;;; (format "*mail*<%d>" index)))) | 1728 | ;; (format "*mail*<%d>" index)))) |
| 1729 | ;;; (not (buffer-modified-p buffer))) | 1729 | ;; (not (buffer-modified-p buffer))) |
| 1730 | ;;; (setq index (1+ index))) | 1730 | ;; (setq index (1+ index))) |
| 1731 | ;;; (if buffer (switch-to-buffer buffer) | 1731 | ;; (if buffer (switch-to-buffer buffer) |
| 1732 | ;;; ;; If none exists, start a new message. | 1732 | ;; ;; If none exists, start a new message. |
| 1733 | ;;; ;; This will never re-use an existing unmodified mail buffer | 1733 | ;; ;; This will never re-use an existing unmodified mail buffer |
| 1734 | ;;; ;; (since index is not 1 anymore). Perhaps it should. | 1734 | ;; ;; (since index is not 1 anymore). Perhaps it should. |
| 1735 | ;;; (setq noerase nil)))) | 1735 | ;; (setq noerase nil)))) |
| 1736 | ;;; ;; Unless we found a modified message and are happy, start a new message. | 1736 | ;; ;; Unless we found a modified message and are happy, start a new message. |
| 1737 | ;;; (if (not noerase) | 1737 | ;; (if (not noerase) |
| 1738 | ;;; (progn | 1738 | ;; (progn |
| 1739 | ;;; ;; Look for existing unmodified mail buffer. | 1739 | ;; ;; Look for existing unmodified mail buffer. |
| 1740 | ;;; (while (and (setq buffer | 1740 | ;; (while (and (setq buffer |
| 1741 | ;;; (get-buffer (if (= 1 index) "*mail*" | 1741 | ;; (get-buffer (if (= 1 index) "*mail*" |
| 1742 | ;;; (format "*mail*<%d>" index)))) | 1742 | ;; (format "*mail*<%d>" index)))) |
| 1743 | ;;; (buffer-modified-p buffer)) | 1743 | ;; (buffer-modified-p buffer)) |
| 1744 | ;;; (setq index (1+ index))) | 1744 | ;; (setq index (1+ index))) |
| 1745 | ;;; ;; If none, make a new one. | 1745 | ;; ;; If none, make a new one. |
| 1746 | ;;; (or buffer | 1746 | ;; (or buffer |
| 1747 | ;;; (setq buffer (generate-new-buffer "*mail*"))) | 1747 | ;; (setq buffer (generate-new-buffer "*mail*"))) |
| 1748 | ;;; ;; Go there and initialize it. | 1748 | ;; ;; Go there and initialize it. |
| 1749 | ;;; (switch-to-buffer buffer) | 1749 | ;; (switch-to-buffer buffer) |
| 1750 | ;;; (erase-buffer) | 1750 | ;; (erase-buffer) |
| 1751 | ;;; (setq default-directory (expand-file-name "~/")) | 1751 | ;; (setq default-directory (expand-file-name "~/")) |
| 1752 | ;;; (auto-save-mode auto-save-default) | 1752 | ;; (auto-save-mode auto-save-default) |
| 1753 | ;;; (mail-mode) | 1753 | ;; (mail-mode) |
| 1754 | ;;; (mail-setup to subject in-reply-to cc replybuffer actions) | 1754 | ;; (mail-setup to subject in-reply-to cc replybuffer actions) |
| 1755 | ;;; (if (and buffer-auto-save-file-name | 1755 | ;; (if (and buffer-auto-save-file-name |
| 1756 | ;;; (file-exists-p buffer-auto-save-file-name)) | 1756 | ;; (file-exists-p buffer-auto-save-file-name)) |
| 1757 | ;;; (message "Auto save file for draft message exists; consider M-x mail-recover")) | 1757 | ;; (message "Auto save file for draft message exists; consider M-x mail-recover")) |
| 1758 | ;;; t)) | 1758 | ;; t)) |
| 1759 | 1759 | ||
| 1760 | (if (eq noerase 'new) | 1760 | (if (eq noerase 'new) |
| 1761 | (pop-to-buffer (generate-new-buffer "*mail*")) | 1761 | (pop-to-buffer (generate-new-buffer "*mail*")) |
| @@ -1776,7 +1776,7 @@ The seventh argument ACTIONS is a list of actions to take | |||
| 1776 | (mail-mode) | 1776 | (mail-mode) |
| 1777 | ;; Disconnect the buffer from its visited file | 1777 | ;; Disconnect the buffer from its visited file |
| 1778 | ;; (in case the user has actually visited a file *mail*). | 1778 | ;; (in case the user has actually visited a file *mail*). |
| 1779 | ;;; (set-visited-file-name nil) | 1779 | ;; (set-visited-file-name nil) |
| 1780 | (let (initialized) | 1780 | (let (initialized) |
| 1781 | (and (not (and noerase | 1781 | (and (not (and noerase |
| 1782 | (not (eq noerase 'new)))) | 1782 | (not (eq noerase 'new)))) |