diff options
| author | Stefan Kangas | 2020-12-05 10:54:14 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2020-12-05 10:54:14 +0100 |
| commit | f254c8b5f3df13bdee246fd9217870fa74dceea6 (patch) | |
| tree | d6541bd8777dcbcab769c61263beaca1727ff0d1 | |
| parent | 5ef30fbf11c3ee0ff1c30061dab554b9bd3ce841 (diff) | |
| download | emacs-f254c8b5f3df13bdee246fd9217870fa74dceea6.tar.gz emacs-f254c8b5f3df13bdee246fd9217870fa74dceea6.zip | |
Prefer setq-local in mail/*.el
* lisp/mail/emacsbug.el (report-emacs-bug):
* lisp/mail/rfc822.el (rfc822-addresses):
* lisp/mail/rmail.el (rmail-perm-variables, rmail-show-message-1):
* lisp/mail/rmailedit.el (rmail-edit-mode):
(rmail-edit-current-message, rmail-cease-edit):
* lisp/mail/rmailsum.el (rmail-new-summary-1, rmail-summary-mode):
(rmail-summary-update-highlight):
* lisp/mail/sendmail.el (mail-mode): Prefer setq-local.
| -rw-r--r-- | lisp/mail/emacsbug.el | 9 | ||||
| -rw-r--r-- | lisp/mail/rfc822.el | 3 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 57 | ||||
| -rw-r--r-- | lisp/mail/rmailedit.el | 22 | ||||
| -rw-r--r-- | lisp/mail/rmailsum.el | 15 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 26 |
6 files changed, 52 insertions, 80 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index d524b26f1b9..5ad1b9821f4 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el | |||
| @@ -241,12 +241,12 @@ Already submitted bugs can be found in the Emacs bug tracker: | |||
| 241 | ;; that report-emacs-bug-orig-text remains valid. (Bug#5178) | 241 | ;; that report-emacs-bug-orig-text remains valid. (Bug#5178) |
| 242 | (message-sort-headers) | 242 | (message-sort-headers) |
| 243 | ;; Stop message-mode stealing the properties we will add. | 243 | ;; Stop message-mode stealing the properties we will add. |
| 244 | (set (make-local-variable 'message-strip-special-text-properties) nil) | 244 | (setq-local message-strip-special-text-properties nil) |
| 245 | ;; Make sure we default to the From: address as envelope when sending | 245 | ;; Make sure we default to the From: address as envelope when sending |
| 246 | ;; through sendmail. FIXME: Why? | 246 | ;; through sendmail. FIXME: Why? |
| 247 | (when (and (not (message--sendmail-envelope-from)) | 247 | (when (and (not (message--sendmail-envelope-from)) |
| 248 | (message-bogus-recipient-p (message-make-address))) | 248 | (message-bogus-recipient-p (message-make-address))) |
| 249 | (set (make-local-variable 'message-sendmail-envelope-from) 'header))) | 249 | (setq-local message-sendmail-envelope-from 'header))) |
| 250 | (rfc822-goto-eoh) | 250 | (rfc822-goto-eoh) |
| 251 | (forward-line 1) | 251 | (forward-line 1) |
| 252 | ;; Move the mail signature to the proper place. | 252 | ;; Move the mail signature to the proper place. |
| @@ -381,9 +381,8 @@ usually do not have translators for other languages.\n\n"))) | |||
| 381 | (add-hook report-emacs-bug-send-hook 'report-emacs-bug-hook nil t)) | 381 | (add-hook report-emacs-bug-send-hook 'report-emacs-bug-hook nil t)) |
| 382 | (goto-char (point-max)) | 382 | (goto-char (point-max)) |
| 383 | (skip-chars-backward " \t\n") | 383 | (skip-chars-backward " \t\n") |
| 384 | (make-local-variable 'report-emacs-bug-orig-text) | 384 | (setq-local report-emacs-bug-orig-text |
| 385 | (setq report-emacs-bug-orig-text | 385 | (buffer-substring-no-properties (point-min) (point))) |
| 386 | (buffer-substring-no-properties (point-min) (point))) | ||
| 387 | (goto-char user-point))) | 386 | (goto-char user-point))) |
| 388 | 387 | ||
| 389 | (defun emacs-bug--system-description () | 388 | (defun emacs-bug--system-description () |
diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el index 4572f27faf8..70480d4ede6 100644 --- a/lisp/mail/rfc822.el +++ b/lisp/mail/rfc822.el | |||
| @@ -279,8 +279,7 @@ | |||
| 279 | (let ((buf (generate-new-buffer " rfc822"))) | 279 | (let ((buf (generate-new-buffer " rfc822"))) |
| 280 | (unwind-protect | 280 | (unwind-protect |
| 281 | (with-current-buffer buf | 281 | (with-current-buffer buf |
| 282 | (make-local-variable 'case-fold-search) | 282 | (setq-local case-fold-search nil) ;For speed(?) |
| 283 | (setq case-fold-search nil) ;For speed(?) | ||
| 284 | (insert header-text) | 283 | (insert header-text) |
| 285 | ;; unfold continuation lines | 284 | ;; unfold continuation lines |
| 286 | (goto-char (point-min)) | 285 | (goto-char (point-min)) |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 2c972ee7aac..63d992d2717 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -1431,27 +1431,23 @@ If so restore the actual mbox message collection." | |||
| 1431 | (defun rmail-perm-variables () | 1431 | (defun rmail-perm-variables () |
| 1432 | (make-local-variable 'rmail-last-regexp) | 1432 | (make-local-variable 'rmail-last-regexp) |
| 1433 | (make-local-variable 'rmail-deleted-vector) | 1433 | (make-local-variable 'rmail-deleted-vector) |
| 1434 | (make-local-variable 'rmail-buffer) | 1434 | (setq-local rmail-was-converted nil) |
| 1435 | (make-local-variable 'rmail-was-converted) | 1435 | (setq-local rmail-seriously-modified nil) |
| 1436 | (setq rmail-was-converted nil) | 1436 | (setq-local rmail-buffer (current-buffer)) |
| 1437 | (make-local-variable 'rmail-seriously-modified) | ||
| 1438 | (setq rmail-seriously-modified nil) | ||
| 1439 | (setq rmail-buffer (current-buffer)) | ||
| 1440 | (set-buffer-multibyte nil) | 1437 | (set-buffer-multibyte nil) |
| 1441 | (with-current-buffer (setq rmail-view-buffer (rmail-generate-viewer-buffer)) | 1438 | (with-current-buffer (setq rmail-view-buffer (rmail-generate-viewer-buffer)) |
| 1442 | (setq buffer-undo-list t) | 1439 | (setq buffer-undo-list t) |
| 1443 | ;; Note that this does not erase the buffer. Should it? | 1440 | ;; Note that this does not erase the buffer. Should it? |
| 1444 | ;; It depends on how this is called. If somehow called with the | 1441 | ;; It depends on how this is called. If somehow called with the |
| 1445 | ;; rmail buffers swapped, it would erase the message collection. | 1442 | ;; rmail buffers swapped, it would erase the message collection. |
| 1446 | (set (make-local-variable 'rmail-overlay-list) nil) | 1443 | (setq-local rmail-overlay-list nil) |
| 1447 | (set-buffer-multibyte t) | 1444 | (set-buffer-multibyte t) |
| 1448 | ;; Force C-x C-s write Unix EOLs. | 1445 | ;; Force C-x C-s write Unix EOLs. |
| 1449 | (set-buffer-file-coding-system 'undecided-unix)) | 1446 | (set-buffer-file-coding-system 'undecided-unix)) |
| 1450 | (make-local-variable 'rmail-summary-buffer) | 1447 | (make-local-variable 'rmail-summary-buffer) |
| 1451 | (make-local-variable 'rmail-summary-vector) | 1448 | (make-local-variable 'rmail-summary-vector) |
| 1452 | (make-local-variable 'rmail-current-message) | 1449 | (make-local-variable 'rmail-current-message) |
| 1453 | (make-local-variable 'rmail-total-messages) | 1450 | (setq-local rmail-total-messages 0) |
| 1454 | (setq rmail-total-messages 0) | ||
| 1455 | (make-local-variable 'rmail-message-vector) | 1451 | (make-local-variable 'rmail-message-vector) |
| 1456 | (make-local-variable 'rmail-msgref-vector) | 1452 | (make-local-variable 'rmail-msgref-vector) |
| 1457 | (make-local-variable 'rmail-inbox-list) | 1453 | (make-local-variable 'rmail-inbox-list) |
| @@ -1466,39 +1462,30 @@ If so restore the actual mbox message collection." | |||
| 1466 | ;; FIXME expand-file-name? | 1462 | ;; FIXME expand-file-name? |
| 1467 | (concat rmail-spool-directory | 1463 | (concat rmail-spool-directory |
| 1468 | (user-login-name))))))) | 1464 | (user-login-name))))))) |
| 1469 | (set (make-local-variable 'tool-bar-map) rmail-tool-bar-map)) | 1465 | (setq-local tool-bar-map rmail-tool-bar-map)) |
| 1470 | 1466 | ||
| 1471 | ;; Set up the non-permanent locals associated with Rmail mode. | 1467 | ;; Set up the non-permanent locals associated with Rmail mode. |
| 1472 | (defun rmail-variables () | 1468 | (defun rmail-variables () |
| 1473 | ;; Turn off undo. We turn it back on in rmail-edit. | 1469 | ;; Turn off undo. We turn it back on in rmail-edit. |
| 1474 | (setq buffer-undo-list t) | 1470 | (setq buffer-undo-list t) |
| 1475 | ;; Don't let a local variables list in a message cause confusion. | 1471 | ;; Don't let a local variables list in a message cause confusion. |
| 1476 | (make-local-variable 'local-enable-local-variables) | 1472 | (setq-local local-enable-local-variables nil) |
| 1477 | (setq local-enable-local-variables nil) | ||
| 1478 | ;; Don't turn off auto-saving based on the size of the buffer | 1473 | ;; Don't turn off auto-saving based on the size of the buffer |
| 1479 | ;; because that code does not understand buffer-swapping. | 1474 | ;; because that code does not understand buffer-swapping. |
| 1480 | (make-local-variable 'auto-save-include-big-deletions) | 1475 | (setq-local auto-save-include-big-deletions t) |
| 1481 | (setq auto-save-include-big-deletions t) | 1476 | (setq-local revert-buffer-function 'rmail-revert) |
| 1482 | (make-local-variable 'revert-buffer-function) | 1477 | (setq-local font-lock-defaults |
| 1483 | (setq revert-buffer-function 'rmail-revert) | 1478 | '(rmail-font-lock-keywords |
| 1484 | (make-local-variable 'font-lock-defaults) | 1479 | t t nil nil |
| 1485 | (setq font-lock-defaults | 1480 | (font-lock-maximum-size . nil) |
| 1486 | '(rmail-font-lock-keywords | 1481 | (font-lock-dont-widen . t) |
| 1487 | t t nil nil | 1482 | (font-lock-inhibit-thing-lock . (lazy-lock-mode fast-lock-mode)))) |
| 1488 | (font-lock-maximum-size . nil) | 1483 | (setq-local require-final-newline nil) |
| 1489 | (font-lock-dont-widen . t) | 1484 | (setq-local version-control 'never) |
| 1490 | (font-lock-inhibit-thing-lock . (lazy-lock-mode fast-lock-mode)))) | ||
| 1491 | (make-local-variable 'require-final-newline) | ||
| 1492 | (setq require-final-newline nil) | ||
| 1493 | (make-local-variable 'version-control) | ||
| 1494 | (setq version-control 'never) | ||
| 1495 | (add-hook 'kill-buffer-hook #'rmail-mode-kill-summary nil t) | 1485 | (add-hook 'kill-buffer-hook #'rmail-mode-kill-summary nil t) |
| 1496 | (make-local-variable 'file-precious-flag) | 1486 | (setq-local file-precious-flag t) |
| 1497 | (setq file-precious-flag t) | 1487 | (setq-local desktop-save-buffer t) |
| 1498 | (make-local-variable 'desktop-save-buffer) | 1488 | (setq-local save-buffer-coding-system 'no-conversion) |
| 1499 | (setq desktop-save-buffer t) | ||
| 1500 | (make-local-variable 'save-buffer-coding-system) | ||
| 1501 | (setq save-buffer-coding-system 'no-conversion) | ||
| 1502 | (setq next-error-move-function 'rmail-next-error-move)) | 1489 | (setq next-error-move-function 'rmail-next-error-move)) |
| 1503 | 1490 | ||
| 1504 | ;; Handle M-x revert-buffer done in an rmail-mode buffer. | 1491 | ;; Handle M-x revert-buffer done in an rmail-mode buffer. |
| @@ -2787,7 +2774,7 @@ The current mail message becomes the message displayed." | |||
| 2787 | ;; rmail-header-style based on the binding in effect when | 2774 | ;; rmail-header-style based on the binding in effect when |
| 2788 | ;; this function is called; `rmail-toggle-header' can | 2775 | ;; this function is called; `rmail-toggle-header' can |
| 2789 | ;; inspect this value to determine how to toggle. | 2776 | ;; inspect this value to determine how to toggle. |
| 2790 | (set (make-local-variable 'rmail-header-style) header-style) | 2777 | (setq-local rmail-header-style header-style) |
| 2791 | ;; In case viewing the previous message sets the paragraph | 2778 | ;; In case viewing the previous message sets the paragraph |
| 2792 | ;; direction non-nil, we reset it here to allow independent | 2779 | ;; direction non-nil, we reset it here to allow independent |
| 2793 | ;; dynamic determination of paragraph direction in every | 2780 | ;; dynamic determination of paragraph direction in every |
| @@ -2798,7 +2785,7 @@ The current mail message becomes the message displayed." | |||
| 2798 | (re-search-forward "mime-version: 1.0" nil t)) | 2785 | (re-search-forward "mime-version: 1.0" nil t)) |
| 2799 | (let ((rmail-buffer mbox-buf) | 2786 | (let ((rmail-buffer mbox-buf) |
| 2800 | (rmail-view-buffer view-buf)) | 2787 | (rmail-view-buffer view-buf)) |
| 2801 | (set (make-local-variable 'rmail-mime-decoded) t) | 2788 | (setq-local rmail-mime-decoded t) |
| 2802 | (funcall rmail-show-mime-function)) | 2789 | (funcall rmail-show-mime-function)) |
| 2803 | (setq body-start (search-forward "\n\n" nil t)) | 2790 | (setq body-start (search-forward "\n\n" nil t)) |
| 2804 | (narrow-to-region beg (point)) | 2791 | (narrow-to-region beg (point)) |
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 3026283a082..72a5603ddc2 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el | |||
| @@ -66,8 +66,7 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 66 | (setq mode-line-modified (default-value 'mode-line-modified)) | 66 | (setq mode-line-modified (default-value 'mode-line-modified)) |
| 67 | ;; 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 |
| 68 | ;; because that code does not understand buffer-swapping. | 68 | ;; because that code does not understand buffer-swapping. |
| 69 | (make-local-variable 'auto-save-include-big-deletions) | 69 | (setq-local auto-save-include-big-deletions t) |
| 70 | (setq auto-save-include-big-deletions t) | ||
| 71 | ;; If someone uses C-x C-s, don't clobber the rmail file (bug#2625). | 70 | ;; If someone uses C-x C-s, don't clobber the rmail file (bug#2625). |
| 72 | (add-hook 'write-region-annotate-functions | 71 | (add-hook 'write-region-annotate-functions |
| 73 | 'rmail-write-region-annotate nil t) | 72 | 'rmail-write-region-annotate nil t) |
| @@ -98,10 +97,9 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 98 | (if (zerop rmail-total-messages) | 97 | (if (zerop rmail-total-messages) |
| 99 | (error "No messages in this buffer")) | 98 | (error "No messages in this buffer")) |
| 100 | (rmail-modify-format) | 99 | (rmail-modify-format) |
| 101 | (make-local-variable 'rmail-old-pruned) | 100 | (setq-local rmail-old-pruned (rmail-msg-is-pruned)) |
| 102 | (setq rmail-old-pruned (rmail-msg-is-pruned)) | ||
| 103 | (rmail-edit-mode) | 101 | (rmail-edit-mode) |
| 104 | (set (make-local-variable 'rmail-old-mime-state) | 102 | (setq-local rmail-old-mime-state |
| 105 | (and rmail-enable-mime | 103 | (and rmail-enable-mime |
| 106 | ;; If you use something else, you are on your own. | 104 | ;; If you use something else, you are on your own. |
| 107 | (eq rmail-mime-feature 'rmailmm) | 105 | (eq rmail-mime-feature 'rmailmm) |
| @@ -125,13 +123,11 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 125 | (goto-char (point-min)) | 123 | (goto-char (point-min)) |
| 126 | ;; t = decoded; raw = raw. | 124 | ;; t = decoded; raw = raw. |
| 127 | (aref (aref (rmail-mime-entity-display entity) 0) 0))))) | 125 | (aref (aref (rmail-mime-entity-display entity) 0) 0))))) |
| 128 | (make-local-variable 'rmail-old-text) | 126 | (setq-local rmail-old-text |
| 129 | (setq rmail-old-text | 127 | (save-restriction |
| 130 | (save-restriction | 128 | (widen) |
| 131 | (widen) | 129 | (buffer-substring (point-min) (point-max)))) |
| 132 | (buffer-substring (point-min) (point-max)))) | 130 | (setq-local rmail-old-headers (rmail-edit-headers-alist t)) |
| 133 | (make-local-variable 'rmail-old-headers) | ||
| 134 | (setq rmail-old-headers (rmail-edit-headers-alist t)) | ||
| 135 | (setq buffer-read-only nil) | 131 | (setq buffer-read-only nil) |
| 136 | (setq buffer-undo-list nil) | 132 | (setq buffer-undo-list nil) |
| 137 | ;; Whether the buffer is initially marked as modified or not | 133 | ;; Whether the buffer is initially marked as modified or not |
| @@ -209,7 +205,7 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 209 | (kill-all-local-variables) | 205 | (kill-all-local-variables) |
| 210 | (rmail-mode-1) | 206 | (rmail-mode-1) |
| 211 | (if (boundp 'tool-bar-map) | 207 | (if (boundp 'tool-bar-map) |
| 212 | (set (make-local-variable 'tool-bar-map) rmail-tool-bar-map)) | 208 | (setq-local tool-bar-map rmail-tool-bar-map)) |
| 213 | (setq buffer-undo-list t) | 209 | (setq buffer-undo-list t) |
| 214 | (rmail-variables)) | 210 | (rmail-variables)) |
| 215 | ;; If text has really changed, mark message as edited. | 211 | ;; If text has really changed, mark message as edited. |
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 521659b7eb6..a085e0bc4ff 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -532,8 +532,7 @@ message." | |||
| 532 | ;; Set up the rest of its state and local variables. | 532 | ;; Set up the rest of its state and local variables. |
| 533 | (setq buffer-read-only t) | 533 | (setq buffer-read-only t) |
| 534 | (rmail-summary-mode) | 534 | (rmail-summary-mode) |
| 535 | (make-local-variable 'minor-mode-alist) | 535 | (setq-local minor-mode-alist (list (list t (concat ": " description)))) |
| 536 | (setq minor-mode-alist (list (list t (concat ": " description)))) | ||
| 537 | (setq rmail-buffer rbuf | 536 | (setq rmail-buffer rbuf |
| 538 | rmail-summary-redo redo | 537 | rmail-summary-redo redo |
| 539 | rmail-total-messages total))) | 538 | rmail-total-messages total))) |
| @@ -1089,13 +1088,10 @@ Commands for sorting the summary: | |||
| 1089 | (set-syntax-table text-mode-syntax-table) | 1088 | (set-syntax-table text-mode-syntax-table) |
| 1090 | (make-local-variable 'rmail-buffer) | 1089 | (make-local-variable 'rmail-buffer) |
| 1091 | (make-local-variable 'rmail-total-messages) | 1090 | (make-local-variable 'rmail-total-messages) |
| 1092 | (make-local-variable 'rmail-current-message) | 1091 | (setq-local rmail-current-message nil) |
| 1093 | (setq rmail-current-message nil) | 1092 | (setq-local rmail-summary-redo nil) |
| 1094 | (make-local-variable 'rmail-summary-redo) | ||
| 1095 | (setq rmail-summary-redo nil) | ||
| 1096 | (make-local-variable 'revert-buffer-function) | 1093 | (make-local-variable 'revert-buffer-function) |
| 1097 | (make-local-variable 'font-lock-defaults) | 1094 | (setq-local font-lock-defaults '(rmail-summary-font-lock-keywords t)) |
| 1098 | (setq font-lock-defaults '(rmail-summary-font-lock-keywords t)) | ||
| 1099 | (rmail-summary-enable)) | 1095 | (rmail-summary-enable)) |
| 1100 | 1096 | ||
| 1101 | ;; Summary features need to be disabled during edit mode. | 1097 | ;; Summary features need to be disabled during edit mode. |
| @@ -1288,8 +1284,7 @@ Returns non-nil if message N was found." | |||
| 1288 | ;; Make sure we have an overlay to use. | 1284 | ;; Make sure we have an overlay to use. |
| 1289 | (or rmail-summary-overlay | 1285 | (or rmail-summary-overlay |
| 1290 | (progn | 1286 | (progn |
| 1291 | (make-local-variable 'rmail-summary-overlay) | 1287 | (setq-local rmail-summary-overlay (make-overlay (point) (point))) |
| 1292 | (setq rmail-summary-overlay (make-overlay (point) (point))) | ||
| 1293 | (overlay-put rmail-summary-overlay 'rmail-summary t))) | 1288 | (overlay-put rmail-summary-overlay 'rmail-summary t))) |
| 1294 | ;; If this message is in the summary, use the overlay to highlight it. | 1289 | ;; If this message is in the summary, use the overlay to highlight it. |
| 1295 | ;; Otherwise, don't highlight anything. | 1290 | ;; Otherwise, don't highlight anything. |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 7610939e575..02a852f19bd 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -691,29 +691,25 @@ Turning on Mail mode runs the normal hooks `text-mode-hook' and | |||
| 691 | (make-local-variable 'mail-reply-action) | 691 | (make-local-variable 'mail-reply-action) |
| 692 | (make-local-variable 'mail-send-actions) | 692 | (make-local-variable 'mail-send-actions) |
| 693 | (make-local-variable 'mail-return-action) | 693 | (make-local-variable 'mail-return-action) |
| 694 | (make-local-variable 'mail-encode-mml) | 694 | (setq-local mail-encode-mml nil) |
| 695 | (setq mail-encode-mml nil) | ||
| 696 | (setq buffer-offer-save t) | 695 | (setq buffer-offer-save t) |
| 697 | (make-local-variable 'font-lock-defaults) | 696 | (setq-local font-lock-defaults '(mail-font-lock-keywords t t)) |
| 698 | (setq font-lock-defaults '(mail-font-lock-keywords t t)) | ||
| 699 | (make-local-variable 'paragraph-separate) | 697 | (make-local-variable 'paragraph-separate) |
| 700 | (setq-local normal-auto-fill-function #'mail-mode-auto-fill) | 698 | (setq-local normal-auto-fill-function #'mail-mode-auto-fill) |
| 701 | (setq-local fill-paragraph-function #'mail-mode-fill-paragraph) | 699 | (setq-local fill-paragraph-function #'mail-mode-fill-paragraph) |
| 702 | ;; Allow using comment commands to add/remove quoting (this only does | 700 | ;; Allow using comment commands to add/remove quoting (this only does |
| 703 | ;; anything if mail-yank-prefix is set to a non-nil value). | 701 | ;; anything if mail-yank-prefix is set to a non-nil value). |
| 704 | (set (make-local-variable 'comment-start) mail-yank-prefix) | 702 | (setq-local comment-start mail-yank-prefix) |
| 705 | (if mail-yank-prefix | 703 | (if mail-yank-prefix |
| 706 | (set (make-local-variable 'comment-start-skip) | 704 | (setq-local comment-start-skip |
| 707 | (concat "^" (regexp-quote mail-yank-prefix) "[ \t]*"))) | 705 | (concat "^" (regexp-quote mail-yank-prefix) "[ \t]*"))) |
| 708 | (make-local-variable 'adaptive-fill-regexp) | ||
| 709 | ;; Also update the paragraph-separate entry if you change this. | 706 | ;; Also update the paragraph-separate entry if you change this. |
| 710 | (setq adaptive-fill-regexp | 707 | (setq-local adaptive-fill-regexp |
| 711 | (concat "[ \t]*[-[:alnum:]]+>+[ \t]*\\|" | 708 | (concat "[ \t]*[-[:alnum:]]+>+[ \t]*\\|" |
| 712 | adaptive-fill-regexp)) | 709 | adaptive-fill-regexp)) |
| 713 | (make-local-variable 'adaptive-fill-first-line-regexp) | 710 | (setq-local adaptive-fill-first-line-regexp |
| 714 | (setq adaptive-fill-first-line-regexp | 711 | (concat "[ \t]*[-[:alnum:]]*>+[ \t]*\\|" |
| 715 | (concat "[ \t]*[-[:alnum:]]*>+[ \t]*\\|" | 712 | adaptive-fill-first-line-regexp)) |
| 716 | adaptive-fill-first-line-regexp)) | ||
| 717 | (add-hook 'completion-at-point-functions #'mail-completion-at-point-function | 713 | (add-hook 'completion-at-point-functions #'mail-completion-at-point-function |
| 718 | nil 'local) | 714 | nil 'local) |
| 719 | ;; `-- ' precedes the signature. `-----' appears at the start of the | 715 | ;; `-- ' precedes the signature. `-----' appears at the start of the |