diff options
| author | Katsumi Yamaoka | 2008-12-03 23:49:00 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2008-12-03 23:49:00 +0000 |
| commit | 1bd6cd6c649d0f6d43ed4986c9d2e49757be4d9e (patch) | |
| tree | ee046d06596d32db1a6adeb304507c9136da88e7 | |
| parent | f7ede2fac5c03d0013a6045f6ff242743939a060 (diff) | |
| download | emacs-1bd6cd6c649d0f6d43ed4986c9d2e49757be4d9e.tar.gz emacs-1bd6cd6c649d0f6d43ed4986c9d2e49757be4d9e.zip | |
(message-idna-to-ascii-rhs-1): Fix previous commit.
(message-idna-to-ascii-rhs): Add a comment. Suggested by RMS.
| -rw-r--r-- | lisp/gnus/message.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index d25603f039c..019fb626eeb 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -5635,14 +5635,13 @@ subscribed address (and not the additional To and Cc header contents)." | |||
| 5635 | (dolist (rhs | 5635 | (dolist (rhs |
| 5636 | (mm-delete-duplicates | 5636 | (mm-delete-duplicates |
| 5637 | (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) "")) | 5637 | (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) "")) |
| 5638 | (mapcar (lambda (domain) | 5638 | (mapcar 'downcase |
| 5639 | (if domain | ||
| 5640 | (downcase domain) | ||
| 5641 | "")) | ||
| 5642 | (mapcar | 5639 | (mapcar |
| 5643 | 'cadr | 5640 | 'cadr |
| 5644 | (mail-extract-address-components field t)))))) | 5641 | (mail-extract-address-components field t)))))) |
| 5645 | (setq ace (if (string-match "\\`[[:ascii:]]+\\'" rhs) | 5642 | ;; Note that `rhs' will be "" if the address does not have |
| 5643 | ;; the domain part, i.e., if it is a local user's address. | ||
| 5644 | (setq ace (if (string-match "\\`[[:ascii:]]*\\'" rhs) | ||
| 5646 | rhs | 5645 | rhs |
| 5647 | (downcase (idna-to-ascii rhs)))) | 5646 | (downcase (idna-to-ascii rhs)))) |
| 5648 | (when (and (not (equal rhs ace)) | 5647 | (when (and (not (equal rhs ace)) |
| @@ -5664,6 +5663,12 @@ See `message-idna-encode'." | |||
| 5664 | (when message-use-idna | 5663 | (when message-use-idna |
| 5665 | (save-excursion | 5664 | (save-excursion |
| 5666 | (save-restriction | 5665 | (save-restriction |
| 5666 | ;; `message-narrow-to-head' that recognizes only the first empty | ||
| 5667 | ;; line as the message header separator used to be used here. | ||
| 5668 | ;; However, since there is the "--text follows this line--" line | ||
| 5669 | ;; normally, it failed in narrowing to the headers and potentially | ||
| 5670 | ;; caused the IDNA encoding on lines that look like headers in | ||
| 5671 | ;; the message body. | ||
| 5667 | (message-narrow-to-headers-or-head) | 5672 | (message-narrow-to-headers-or-head) |
| 5668 | (message-idna-to-ascii-rhs-1 "From") | 5673 | (message-idna-to-ascii-rhs-1 "From") |
| 5669 | (message-idna-to-ascii-rhs-1 "To") | 5674 | (message-idna-to-ascii-rhs-1 "To") |