diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-01-24 21:05:33 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-01-24 21:05:33 +0100 |
commit | b8d3ae78c54db7c7bb65d367a80f9be3d8744c48 (patch) | |
tree | 982f190d1dd79685c43a9829dd66e6a7cbbd0c67 /lisp/mail | |
parent | 0ffb3dfaa483b0c5cf1f7f367efcb5e9c041ab53 (diff) | |
parent | e5aaa1251cfb9d6d18682a5eda137a2e12ca4213 (diff) | |
download | emacs-b8d3ae78c54db7c7bb65d367a80f9be3d8744c48.tar.gz emacs-b8d3ae78c54db7c7bb65d367a80f9be3d8744c48.tar.bz2 emacs-b8d3ae78c54db7c7bb65d367a80f9be3d8744c48.zip |
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/flow-fill.el | 2 | ||||
-rw-r--r-- | lisp/mail/footnote.el | 26 | ||||
-rw-r--r-- | lisp/mail/rmailedit.el | 9 | ||||
-rw-r--r-- | lisp/mail/rmailsum.el | 6 |
4 files changed, 35 insertions, 8 deletions
diff --git a/lisp/mail/flow-fill.el b/lisp/mail/flow-fill.el index e93ba547a89..0fab1b21b47 100644 --- a/lisp/mail/flow-fill.el +++ b/lisp/mail/flow-fill.el @@ -174,8 +174,8 @@ lines." (defvar fill-flowed-encode-tests) (defun fill-flowed-test () - (interactive "") (declare (obsolete nil "27.1")) + (interactive "") (user-error (concat "This function is obsolete. Please see " "test/lisp/mail/flow-fill-tests.el " "in the Emacs source tree"))) diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index ea109eec12a..995ae5f9160 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -910,7 +910,31 @@ play around with the following keys: (unless (assoc bullet-regexp filladapt-token-table) (setq filladapt-token-table (append filladapt-token-table - (list (list bullet-regexp 'bullet))))))))) + (list (list bullet-regexp 'bullet))))))) + (footnote--regenerate-alist))) + +(defun footnote--regenerate-alist () + (save-excursion + (goto-char (point-min)) + (when (re-search-forward footnote-section-tag-regexp nil t) + (setq footnote--markers-alist + (cl-loop + with start-of-footnotes = (match-beginning 0) + with regexp = (footnote--current-regexp) + for (note text) in + (cl-loop for pos = (re-search-forward regexp nil t) + while pos + collect (list (match-string 1) + (copy-marker (match-beginning 0) t))) + do (goto-char (point-min)) + collect (cl-list* + (string-to-number note) + text + (cl-loop + for pos = (re-search-forward regexp start-of-footnotes t) + while pos + when (equal note (match-string 1)) + collect (copy-marker (match-beginning 0) t)))))))) (provide 'footnote) diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 2680ed7f3a3..c3b351d7bc8 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -145,8 +145,9 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. (declare-function rmail-summary-enable "rmailsum" ()) (declare-function rmail-summary-update-line "rmailsum" (n)) -(defun rmail-cease-edit () - "Finish editing message; switch back to Rmail proper." +(defun rmail-cease-edit (&optional abort) + "Finish editing message; switch back to Rmail proper. +If ABORT, this is the result of aborting an edit." (interactive) (if (rmail-summary-exists) (with-current-buffer rmail-summary-buffer @@ -271,6 +272,8 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. ;; No match for rmail-mime-charset-pattern, but there was some ;; other Content-Type. We should not insert another. (Bug#4624) (content-type) + ;; Don't insert anything if aborting. + (abort) ((null old-coding) ;; If there was no charset= spec, insert one. (backward-char 1) @@ -352,7 +355,7 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. (widen) (delete-region (point-min) (point-max)) (insert rmail-old-text) - (rmail-cease-edit) + (rmail-cease-edit t) (rmail-highlight-headers)) (defun rmail-edit-headers-alist (&optional widen markers) diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 60b67edf85a..d29115a9570 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -51,10 +51,10 @@ Setting this option to nil might speed up the generation of summaries." :group 'rmail-summary) (defvar rmail-summary-font-lock-keywords - '(("^.....D.*" . font-lock-string-face) ; Deleted. - ("^.....-.*" . font-lock-type-face) ; Unread. + '(("^ *[0-9]+D.*" . font-lock-string-face) ; Deleted. + ("^ *[0-9]+-.*" . font-lock-type-face) ; Unread. ;; Neither of the below will be highlighted if either of the above are: - ("^.....[^D-] \\(......\\)" 1 font-lock-keyword-face) ; Date. + ("^ *[0-9]+[^D-] \\(......\\)" 1 font-lock-keyword-face) ; Date. ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face)) ; Labels. "Additional expressions to highlight in Rmail Summary mode.") |