diff options
| -rw-r--r-- | lisp/gnus/message.el | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index cc147b3a8f3..a23e3ba5114 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -2197,33 +2197,26 @@ charset: " | |||
| 2197 | "Remove trailing \"(was: <old subject>)\" from SUBJECT lines. | 2197 | "Remove trailing \"(was: <old subject>)\" from SUBJECT lines. |
| 2198 | Leading \"Re: \" is not stripped by this function. Use the function | 2198 | Leading \"Re: \" is not stripped by this function. Use the function |
| 2199 | `message-strip-subject-re' for this." | 2199 | `message-strip-subject-re' for this." |
| 2200 | (let* ((query message-subject-trailing-was-query) | 2200 | (or |
| 2201 | (new) (found)) | 2201 | (let ((query message-subject-trailing-was-query) new) |
| 2202 | (setq found | 2202 | (and query |
| 2203 | (string-match | 2203 | (string-match (if (eq query 'ask) |
| 2204 | (if (eq query 'ask) | 2204 | message-subject-trailing-was-ask-regexp |
| 2205 | message-subject-trailing-was-ask-regexp | 2205 | message-subject-trailing-was-regexp) |
| 2206 | message-subject-trailing-was-regexp) | 2206 | subject) |
| 2207 | subject)) | 2207 | (setq new (substring subject 0 (match-beginning 0))) |
| 2208 | (if found | 2208 | (or (not (eq query 'ask)) |
| 2209 | (setq new (substring subject 0 (match-beginning 0)))) | 2209 | (message-y-or-n-p |
| 2210 | (if (or (not found) (eq query nil)) | 2210 | "Strip `(was: <old subject>)' in subject? " t |
| 2211 | subject | 2211 | (concat |
| 2212 | (if (eq query 'ask) | 2212 | "Strip `(was: <old subject>)' in subject " |
| 2213 | (if (message-y-or-n-p | 2213 | "and use the new one instead?\n\n" |
| 2214 | "Strip `(was: <old subject>)' in subject? " t | 2214 | "Current subject is: \"" subject "\"\n\n" |
| 2215 | (concat | 2215 | "New subject would be: \"" new "\"\n\n" |
| 2216 | "Strip `(was: <old subject>)' in subject " | 2216 | "See the variable `message-subject-trailing-was-query' " |
| 2217 | "and use the new one instead?\n\n" | 2217 | "to get rid of this query."))) |
| 2218 | "Current subject is: \"" | 2218 | new)) |
| 2219 | subject "\"\n\n" | 2219 | subject)) |
| 2220 | "New subject would be: \"" | ||
| 2221 | new "\"\n\n" | ||
| 2222 | "See the variable `message-subject-trailing-was-query' " | ||
| 2223 | "to get rid of this query." | ||
| 2224 | )) | ||
| 2225 | new subject) | ||
| 2226 | new)))) | ||
| 2227 | 2220 | ||
| 2228 | ;;; Suggested by Jonas Steverud @ www.dtek.chalmers.se/~d4jonas/ | 2221 | ;;; Suggested by Jonas Steverud @ www.dtek.chalmers.se/~d4jonas/ |
| 2229 | 2222 | ||