[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/np/backports-26.2 67f164a 5/9: Revert "Make mail-e
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] scratch/np/backports-26.2 67f164a 5/9: Revert "Make mail-extract-address-components return the user name more" |
Date: |
Sun, 3 Jun 2018 08:02:32 -0400 (EDT) |
branch: scratch/np/backports-26.2
commit 67f164a7bfd9d3aab0bd58d1b2fd9b2846684a45
Author: Lars Ingebrigtsen <address@hidden>
Commit: Noam Postavsky <address@hidden>
Revert "Make mail-extract-address-components return the user name more"
This reverts commit 8b50ae8b2284b5652c2843a9d0d076f4f657be28.
According to tests in bug#27656 by OGAWA Hirofumi, this patch
led to wrong results when binding
(dolist (addr '("Rasmus <address@hidden>" "Rasmus <address@hidden>"))
(dolist (ignore-single '(t nil))
(dolist (ignore-same '(t nil))
(let ((mail-extr-ignore-single-names ignore-single)
(mail-extr-ignore-realname-equals-mailbox-name ignore-same))
(message "%s" (mail-extract-address-components addr))))))
in combination.
(cherry picked from commit a3a9d5434d56f8736cc47e379a1d011d4c779b7c)
---
lisp/mail/mail-extr.el | 39 +++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index 1e18c6d..3e8a41f 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -1406,26 +1406,25 @@ consing a string.)"
(insert (upcase mi) ". ")))
;; Nuke name if it is the same as mailbox name.
- (when mail-extr-ignore-single-names
- (let ((buffer-length (- (point-max) (point-min)))
- (i 0)
- (names-match-flag t))
- (when (and (> buffer-length 0)
- (eq buffer-length (- mbox-end mbox-beg)))
- (goto-char (point-max))
- (insert-buffer-substring canonicalization-buffer
- mbox-beg mbox-end)
- (while (and names-match-flag
- (< i buffer-length))
- (or (eq (downcase (char-after (+ i (point-min))))
- (downcase
- (char-after (+ i buffer-length (point-min)))))
- (setq names-match-flag nil))
- (setq i (1+ i)))
- (delete-region (+ (point-min) buffer-length) (point-max))
- (and names-match-flag
- mail-extr-ignore-realname-equals-mailbox-name
- (narrow-to-region (point) (point))))))
+ (let ((buffer-length (- (point-max) (point-min)))
+ (i 0)
+ (names-match-flag t))
+ (when (and (> buffer-length 0)
+ (eq buffer-length (- mbox-end mbox-beg)))
+ (goto-char (point-max))
+ (insert-buffer-substring canonicalization-buffer
+ mbox-beg mbox-end)
+ (while (and names-match-flag
+ (< i buffer-length))
+ (or (eq (downcase (char-after (+ i (point-min))))
+ (downcase
+ (char-after (+ i buffer-length (point-min)))))
+ (setq names-match-flag nil))
+ (setq i (1+ i)))
+ (delete-region (+ (point-min) buffer-length) (point-max))
+ (and names-match-flag
+ mail-extr-ignore-realname-equals-mailbox-name
+ (narrow-to-region (point) (point)))))
;; Nuke name if it's just one word.
(goto-char (point-min))
- [Emacs-diffs] branch scratch/np/backports-26.2 created (now 2305ee7), Noam Postavsky, 2018/06/03
- [Emacs-diffs] scratch/np/backports-26.2 4491b27 2/9: Fix CHECK_ALLOCATED_AND_LIVE abort during GC, Noam Postavsky, 2018/06/03
- [Emacs-diffs] scratch/np/backports-26.2 09d0493 4/9: Centralize Bug#30931 fix, Noam Postavsky, 2018/06/03
- [Emacs-diffs] scratch/np/backports-26.2 e54624a 1/9: Don't wait for visible frames to become visible, Noam Postavsky, 2018/06/03
- [Emacs-diffs] scratch/np/backports-26.2 0058ef3 6/9: Fix cl-print for circular sublists (Bug#31146), Noam Postavsky, 2018/06/03
- [Emacs-diffs] scratch/np/backports-26.2 9c78312 3/9: Fix another case of freed markers in the undo-list (Bug#30931), Noam Postavsky, 2018/06/03
- [Emacs-diffs] scratch/np/backports-26.2 c1a5546 7/9: * lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363)., Noam Postavsky, 2018/06/03
- [Emacs-diffs] scratch/np/backports-26.2 47ab98e 8/9: esh-opt.el: Fix improper parsing of first argument (Bug#28323), Noam Postavsky, 2018/06/03
- [Emacs-diffs] scratch/np/backports-26.2 2305ee7 9/9: Fix bug#30846, along with misc cleanups found along the way, Noam Postavsky, 2018/06/03
- [Emacs-diffs] scratch/np/backports-26.2 67f164a 5/9: Revert "Make mail-extract-address-components return the user name more",
Noam Postavsky <=