diff options
Diffstat (limited to 'lisp/mail')
| -rw-r--r-- | lisp/mail/binhex.el | 10 | ||||
| -rw-r--r-- | lisp/mail/emacsbug.el | 12 | ||||
| -rw-r--r-- | lisp/mail/flow-fill.el | 36 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 19 | ||||
| -rw-r--r-- | lisp/mail/rmailedit.el | 4 | ||||
| -rw-r--r-- | lisp/mail/uudecode.el | 14 |
6 files changed, 29 insertions, 66 deletions
diff --git a/lisp/mail/binhex.el b/lisp/mail/binhex.el index 896f82d7bcc..2c77f88f97b 100644 --- a/lisp/mail/binhex.el +++ b/lisp/mail/binhex.el | |||
| @@ -83,10 +83,8 @@ input and write the converted data to its standard output." | |||
| 83 | "^[^:]...............................................................$") | 83 | "^[^:]...............................................................$") |
| 84 | (defconst binhex-end-line ":$") ; unused | 84 | (defconst binhex-end-line ":$") ; unused |
| 85 | 85 | ||
| 86 | (defvar binhex-temporary-file-directory | 86 | (make-obsolete-variable 'binhex-temporary-file-directory |
| 87 | (cond ((fboundp 'temp-directory) (temp-directory)) | 87 | 'temporary-file-directory "28.1") |
| 88 | ((boundp 'temporary-file-directory) temporary-file-directory) | ||
| 89 | ("/tmp/"))) | ||
| 90 | 88 | ||
| 91 | (defun binhex-insert-char (char &optional count ignored buffer) | 89 | (defun binhex-insert-char (char &optional count ignored buffer) |
| 92 | "Insert COUNT copies of CHARACTER into BUFFER." | 90 | "Insert COUNT copies of CHARACTER into BUFFER." |
| @@ -285,7 +283,7 @@ If HEADER-ONLY is non-nil only decode header and return filename." | |||
| 285 | (file-name (expand-file-name | 283 | (file-name (expand-file-name |
| 286 | (concat (binhex-decode-region-internal start end t) | 284 | (concat (binhex-decode-region-internal start end t) |
| 287 | ".data") | 285 | ".data") |
| 288 | binhex-temporary-file-directory))) | 286 | temporary-file-directory))) |
| 289 | (save-excursion | 287 | (save-excursion |
| 290 | (goto-char start) | 288 | (goto-char start) |
| 291 | (when (re-search-forward binhex-begin-line nil t) | 289 | (when (re-search-forward binhex-begin-line nil t) |
| @@ -296,7 +294,7 @@ If HEADER-ONLY is non-nil only decode header and return filename." | |||
| 296 | (generate-new-buffer " *binhex-work*"))) | 294 | (generate-new-buffer " *binhex-work*"))) |
| 297 | (buffer-disable-undo work-buffer) | 295 | (buffer-disable-undo work-buffer) |
| 298 | (insert-buffer-substring cbuf firstline end) | 296 | (insert-buffer-substring cbuf firstline end) |
| 299 | (cd binhex-temporary-file-directory) | 297 | (cd temporary-file-directory) |
| 300 | (apply 'call-process-region | 298 | (apply 'call-process-region |
| 301 | (point-min) | 299 | (point-min) |
| 302 | (point-max) | 300 | (point-max) |
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index efbc0668553..6b9e1db5fc6 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el | |||
| @@ -324,18 +324,6 @@ usually do not have translators for other languages.\n\n"))) | |||
| 324 | (let ((os (ignore-errors (report-emacs-bug--os-description)))) | 324 | (let ((os (ignore-errors (report-emacs-bug--os-description)))) |
| 325 | (if (stringp os) | 325 | (if (stringp os) |
| 326 | (insert "System Description: " os "\n\n"))) | 326 | (insert "System Description: " os "\n\n"))) |
| 327 | (let ((message-buf (get-buffer "*Messages*"))) | ||
| 328 | (if message-buf | ||
| 329 | (let (beg-pos | ||
| 330 | (end-pos message-end-point)) | ||
| 331 | (with-current-buffer message-buf | ||
| 332 | (goto-char end-pos) | ||
| 333 | (forward-line -10) | ||
| 334 | (setq beg-pos (point))) | ||
| 335 | (terpri (current-buffer) t) | ||
| 336 | (insert "Recent messages:\n") | ||
| 337 | (insert-buffer-substring message-buf beg-pos end-pos)))) | ||
| 338 | (insert "\n") | ||
| 339 | (when (and system-configuration-options | 327 | (when (and system-configuration-options |
| 340 | (not (equal system-configuration-options ""))) | 328 | (not (equal system-configuration-options ""))) |
| 341 | (insert "Configured using:\n 'configure " | 329 | (insert "Configured using:\n 'configure " |
diff --git a/lisp/mail/flow-fill.el b/lisp/mail/flow-fill.el index af3b493a08a..f4b55031194 100644 --- a/lisp/mail/flow-fill.el +++ b/lisp/mail/flow-fill.el | |||
| @@ -131,31 +131,37 @@ lines." | |||
| 131 | (goto-char (match-end 0)) | 131 | (goto-char (match-end 0)) |
| 132 | (unless (looking-at " ") | 132 | (unless (looking-at " ") |
| 133 | (insert " ")) | 133 | (insert " ")) |
| 134 | (end-of-line) | 134 | (while (and (eq (char-before (line-end-position)) ?\s) |
| 135 | (when (and (not (eobp)) | 135 | (not (eobp)) |
| 136 | (save-excursion | 136 | (save-excursion |
| 137 | (forward-line 1) | 137 | (forward-line 1) |
| 138 | (looking-at (format "\\(%s ?\\)[^>]" prefix)))) | 138 | (looking-at (format "\\(%s ?\\)[^>]" prefix)))) |
| 139 | ;; Delete the newline and the quote at the start of the | 139 | (end-of-line) |
| 140 | ;; next line. | 140 | (when (and (not (eobp)) |
| 141 | (delete-region (point) (match-end 1)) | 141 | (save-excursion |
| 142 | (ignore-errors | 142 | (forward-line 1) |
| 143 | (looking-at (format "\\(%s ?\\)[^>]" prefix)))) | ||
| 144 | ;; Delete the newline and the quote at the start of the | ||
| 145 | ;; next line. | ||
| 146 | (delete-region (point) (match-end 1)))) | ||
| 147 | (ignore-errors | ||
| 143 | (let ((fill-prefix (concat prefix " ")) | 148 | (let ((fill-prefix (concat prefix " ")) |
| 144 | adaptive-fill-mode) | 149 | adaptive-fill-mode) |
| 145 | (fill-region (line-beginning-position) | 150 | (fill-region (line-beginning-position) |
| 146 | (line-end-position) | 151 | (line-end-position) |
| 147 | 'left 'nosqueeze)))))) | 152 | 'left 'nosqueeze))))) |
| 148 | (t | 153 | (t |
| 149 | ;; Delete the newline. | 154 | ;; Delete the newline. |
| 150 | (when (eq (following-char) ?\s) | 155 | (when (eq (following-char) ?\s) |
| 151 | (delete-char 1)) | 156 | (delete-char 1)) |
| 152 | ;; Hack: Don't do the flowing on the signature line. | 157 | ;; Hack: Don't do the flowing on the signature line. |
| 153 | (when (and (not (looking-at "-- $")) | 158 | (when (and (not (looking-at "-- $")) |
| 154 | (eq (char-before (line-end-position)) ?\s)) | 159 | (eq (char-before (line-end-position)) ?\s)) |
| 155 | (end-of-line) | 160 | (while (eq (char-before (line-end-position)) ?\s) |
| 156 | (when delete-space | 161 | (end-of-line) |
| 157 | (delete-char -1)) | 162 | (when delete-space |
| 158 | (delete-char 1) | 163 | (delete-char -1)) |
| 164 | (delete-char 1)) | ||
| 159 | (ignore-errors | 165 | (ignore-errors |
| 160 | (let ((fill-prefix "")) | 166 | (let ((fill-prefix "")) |
| 161 | (fill-region (line-beginning-position) | 167 | (fill-region (line-beginning-position) |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 44cde7cb5a9..312baffb901 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -521,25 +521,6 @@ still the current message in the Rmail buffer.") | |||
| 521 | (defvar rmail-mmdf-delim2 "^\001\001\001\001\n" | 521 | (defvar rmail-mmdf-delim2 "^\001\001\001\001\n" |
| 522 | "Regexp marking the end of an mmdf message.") | 522 | "Regexp marking the end of an mmdf message.") |
| 523 | 523 | ||
| 524 | ;; FIXME Post-mbox, this is now unused. | ||
| 525 | ;; In Emacs-22, this was called: | ||
| 526 | ;; i) the very first time a message was shown. | ||
| 527 | ;; ii) when toggling the headers to the normal state, every time. | ||
| 528 | ;; It's not clear what it should do now, since there is nothing that | ||
| 529 | ;; records when a message is shown for the first time (unseen is not | ||
| 530 | ;; necessarily the same thing). | ||
| 531 | ;; See https://lists.gnu.org/r/emacs-devel/2009-03/msg00013.html | ||
| 532 | (defcustom rmail-message-filter nil | ||
| 533 | "If non-nil, a filter function for new messages in RMAIL. | ||
| 534 | Called with region narrowed to the message, including headers, | ||
| 535 | before obeying `rmail-ignored-headers'." | ||
| 536 | :group 'rmail-headers | ||
| 537 | :type '(choice (const nil) function)) | ||
| 538 | |||
| 539 | (make-obsolete-variable 'rmail-message-filter | ||
| 540 | "it is not used (try `rmail-show-message-hook')." | ||
| 541 | "23.1") | ||
| 542 | |||
| 543 | (defcustom rmail-automatic-folder-directives nil | 524 | (defcustom rmail-automatic-folder-directives nil |
| 544 | "List of directives specifying how to automatically file messages. | 525 | "List of directives specifying how to automatically file messages. |
| 545 | Whenever Rmail shows a message in the folder that `rmail-file-name' | 526 | Whenever Rmail shows a message in the folder that `rmail-file-name' |
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index ba6ebad082c..3026283a082 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el | |||
| @@ -63,9 +63,7 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 63 | (use-local-map rmail-edit-map) | 63 | (use-local-map rmail-edit-map) |
| 64 | (setq major-mode 'rmail-edit-mode) | 64 | (setq major-mode 'rmail-edit-mode) |
| 65 | (setq mode-name "RMAIL Edit") | 65 | (setq mode-name "RMAIL Edit") |
| 66 | (if (boundp 'mode-line-modified) | 66 | (setq mode-line-modified (default-value 'mode-line-modified)) |
| 67 | (setq mode-line-modified (default-value 'mode-line-modified)) | ||
| 68 | (setq mode-line-format (default-value 'mode-line-format))) | ||
| 69 | ;; Don't turn off auto-saving based on the size of the buffer | 67 | ;; Don't turn off auto-saving based on the size of the buffer |
| 70 | ;; because that code does not understand buffer-swapping. | 68 | ;; because that code does not understand buffer-swapping. |
| 71 | (make-local-variable 'auto-save-include-big-deletions) | 69 | (make-local-variable 'auto-save-include-big-deletions) |
diff --git a/lisp/mail/uudecode.el b/lisp/mail/uudecode.el index 9423275b2e5..945bff35f79 100644 --- a/lisp/mail/uudecode.el +++ b/lisp/mail/uudecode.el | |||
| @@ -61,10 +61,8 @@ input and write the converted data to its standard output." | |||
| 61 | (setq str (concat str "[^a-z]"))) | 61 | (setq str (concat str "[^a-z]"))) |
| 62 | (concat str ".?$"))) | 62 | (concat str ".?$"))) |
| 63 | 63 | ||
| 64 | (defvar uudecode-temporary-file-directory | 64 | (make-obsolete-variable 'uudecode-temporary-file-directory |
| 65 | (cond ((fboundp 'temp-directory) (temp-directory)) | 65 | 'temporary-file-directory "28.1") |
| 66 | ((boundp 'temporary-file-directory) temporary-file-directory) | ||
| 67 | ("/tmp"))) | ||
| 68 | 66 | ||
| 69 | ;;;###autoload | 67 | ;;;###autoload |
| 70 | (defun uudecode-decode-region-external (start end &optional file-name) | 68 | (defun uudecode-decode-region-external (start end &optional file-name) |
| @@ -86,13 +84,7 @@ used is specified by `uudecode-decoder-program'." | |||
| 86 | (match-string 1))))) | 84 | (match-string 1))))) |
| 87 | (setq tempfile (if file-name | 85 | (setq tempfile (if file-name |
| 88 | (expand-file-name file-name) | 86 | (expand-file-name file-name) |
| 89 | (if (fboundp 'make-temp-file) | 87 | (make-temp-file "uu"))) |
| 90 | (let ((temporary-file-directory | ||
| 91 | uudecode-temporary-file-directory)) | ||
| 92 | (make-temp-file "uu")) | ||
| 93 | (expand-file-name | ||
| 94 | (make-temp-name "uu") | ||
| 95 | uudecode-temporary-file-directory)))) | ||
| 96 | (let ((cdir default-directory) | 88 | (let ((cdir default-directory) |
| 97 | (default-process-coding-system nil)) | 89 | (default-process-coding-system nil)) |
| 98 | (unwind-protect | 90 | (unwind-protect |