Merge from origin/emacs-28

30f1bdb41f Clarify docstring of package-native-compile
c54fda643d Fix Subject "simplification" in Rmail
This commit is contained in:
Stefan Kangas 2022-01-09 06:30:18 +01:00
commit 3984ea8553
2 changed files with 8 additions and 2 deletions

View file

@ -397,7 +397,13 @@ a sane initial value."
:type '(repeat symbol))
(defcustom package-native-compile nil
"Non-nil means to native compile packages on installation."
"Non-nil means to native compile packages after installing them.
This controls ahead-of-time compilation. If this option is nil,
packages are normally compiled after they have been loaded for
the first time.
This option does not have any effect if Emacs was not built with
native compilation support."
:type '(boolean)
:risky t
:version "28.1")

View file

@ -3354,12 +3354,12 @@ removing prefixes such as Re:, Fwd: and so on and mailing list
tags such as [tag]."
(let ((subject (or (rmail-get-header "Subject" msgnum) ""))
(regexp "\\`[ \t\n]*\\(\\(\\w\\{1,4\\}\u00a0*[:]\\|\\[[^]]+]\\)[ \t\n]+\\)*"))
(setq subject (rfc2047-decode-string subject))
;; Corporate mailing systems sometimes add `[External] :'; if that happened,
;; delete everything up thru there. Empirically, that deletion makes
;; the Subject match the other messages in the thread.
(if (string-match "\\[external][ \t\n]*:" subject)
(setq subject (substring subject (match-end 0))))
(setq subject (rfc2047-decode-string subject))
(setq subject (replace-regexp-in-string regexp "" subject))
(replace-regexp-in-string "[ \t\n]+" " " subject)))