diff options
| author | Alexandre Garreau | 2019-05-13 16:34:06 -0400 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-05-13 16:34:06 -0400 |
| commit | f515bc6398141fea36b7a77453d5f114a59e55b3 (patch) | |
| tree | 59cbb113d131c0f41eb01c1c36c5d3a2f3695cca | |
| parent | 86c8582c9e4497406522c3073e232e1af2eb23d1 (diff) | |
| download | emacs-f515bc6398141fea36b7a77453d5f114a59e55b3.tar.gz emacs-f515bc6398141fea36b7a77453d5f114a59e55b3.zip | |
[PATCH 1/1] Adds variable 'eww-accept-content-types'
* lisp/gnus/message.el (message-simplify-subject): Decouple
simplification from "Re:" adding (bug#33200).
(message-reply): Add the "Re:"'s here.
(message-followup): And here.
| -rw-r--r-- | lisp/gnus/message.el | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 2c2122d89ab..442104af8a8 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -2051,8 +2051,9 @@ see `message-narrow-to-headers-or-head'." | |||
| 2051 | (let ((regexp (if (stringp gnus-list-identifiers) | 2051 | (let ((regexp (if (stringp gnus-list-identifiers) |
| 2052 | gnus-list-identifiers | 2052 | gnus-list-identifiers |
| 2053 | (mapconcat 'identity gnus-list-identifiers " *\\|")))) | 2053 | (mapconcat 'identity gnus-list-identifiers " *\\|")))) |
| 2054 | (if (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp | 2054 | (if (and (not (equal regexp "")) |
| 2055 | " *\\)\\)+\\(Re: +\\)?\\)") subject) | 2055 | (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp |
| 2056 | " *\\)\\)+\\(Re: +\\)?\\)") subject)) | ||
| 2056 | (concat (substring subject 0 (match-beginning 1)) | 2057 | (concat (substring subject 0 (match-beginning 1)) |
| 2057 | (or (match-string 3 subject) | 2058 | (or (match-string 3 subject) |
| 2058 | (match-string 5 subject)) | 2059 | (match-string 5 subject)) |
| @@ -6948,21 +6949,12 @@ Useful functions to put in this list include: | |||
| 6948 | :type '(repeat function)) | 6949 | :type '(repeat function)) |
| 6949 | 6950 | ||
| 6950 | (defun message-simplify-subject (subject &optional functions) | 6951 | (defun message-simplify-subject (subject &optional functions) |
| 6951 | "Return simplified SUBJECT." | 6952 | "Return simplified SUBJECT. |
| 6952 | (unless functions | 6953 | Do so by calling each one-argument function in the list of functions |
| 6953 | ;; Simplify fully: | 6954 | specified by FUNCTIONS, if non-nil, or by the variable |
| 6954 | (setq functions message-simplify-subject-functions)) | 6955 | `message-simplify-subject-functions' otherwise." |
| 6955 | (when (and (memq 'message-strip-list-identifiers functions) | 6956 | (dolist (fun (or functions message-simplify-subject-functions) subject) |
| 6956 | gnus-list-identifiers) | 6957 | (setq subject (funcall fun subject)))) |
| 6957 | (setq subject (message-strip-list-identifiers subject))) | ||
| 6958 | (when (memq 'message-strip-subject-re functions) | ||
| 6959 | (setq subject (concat "Re: " (message-strip-subject-re subject)))) | ||
| 6960 | (when (and (memq 'message-strip-subject-trailing-was functions) | ||
| 6961 | message-subject-trailing-was-query) | ||
| 6962 | (setq subject (message-strip-subject-trailing-was subject))) | ||
| 6963 | (when (memq 'message-strip-subject-encoded-words functions) | ||
| 6964 | (setq subject (message-strip-subject-encoded-words subject))) | ||
| 6965 | subject) | ||
| 6966 | 6958 | ||
| 6967 | ;;;###autoload | 6959 | ;;;###autoload |
| 6968 | (defun message-reply (&optional to-address wide switch-function) | 6960 | (defun message-reply (&optional to-address wide switch-function) |
| @@ -6995,7 +6987,7 @@ Useful functions to put in this list include: | |||
| 6995 | subject (or (message-fetch-field "subject") "none")) | 6987 | subject (or (message-fetch-field "subject") "none")) |
| 6996 | 6988 | ||
| 6997 | ;; Strip list identifiers, "Re: ", and "was:" | 6989 | ;; Strip list identifiers, "Re: ", and "was:" |
| 6998 | (setq subject (message-simplify-subject subject)) | 6990 | (setq subject (concat "Re: " (message-simplify-subject subject))) |
| 6999 | 6991 | ||
| 7000 | (when (and (setq gnus-warning (message-fetch-field "gnus-warning")) | 6992 | (when (and (setq gnus-warning (message-fetch-field "gnus-warning")) |
| 7001 | (string-match "<[^>]+>" gnus-warning)) | 6993 | (string-match "<[^>]+>" gnus-warning)) |
| @@ -7066,7 +7058,7 @@ If TO-NEWSGROUPS, use that as the new Newsgroups line." | |||
| 7066 | (string-match "world" distribution))) | 7058 | (string-match "world" distribution))) |
| 7067 | (setq distribution nil)) | 7059 | (setq distribution nil)) |
| 7068 | ;; Strip list identifiers, "Re: ", and "was:" | 7060 | ;; Strip list identifiers, "Re: ", and "was:" |
| 7069 | (setq subject (message-simplify-subject subject)) | 7061 | (setq subject (concat "Re: " (message-simplify-subject subject))) |
| 7070 | (widen)) | 7062 | (widen)) |
| 7071 | 7063 | ||
| 7072 | (message-pop-to-buffer (message-buffer-name "followup" from newsgroups)) | 7064 | (message-pop-to-buffer (message-buffer-name "followup" from newsgroups)) |