aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2004-10-08 17:53:18 +0000
committerEli Zaretskii2004-10-08 17:53:18 +0000
commit67e61e164db888e1357cb509b327d100167012a0 (patch)
treee86f94089f97c3960c525be7536f456c7fab8306
parent010864eabd4d9c8101843ab3687c8e5f19ee49b1 (diff)
downloademacs-67e61e164db888e1357cb509b327d100167012a0.tar.gz
emacs-67e61e164db888e1357cb509b327d100167012a0.zip
(mail-extr-ignore-realname-equals-mailbox-name): New defcustom.
(extract-address-components): Use it.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/mail/mail-extr.el14
2 files changed, 17 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5f6bdb7f99c..99e32010afd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12004-10-08 Sebastien Kirche <seki@seki.fr> (tiny change)
2
3 * mail/mail-extr.el (mail-extr-ignore-realname-equals-mailbox-name):
4 New defcustom.
5 (extract-address-components): Use it.
6
12004-10-08 Paul Pogonyshev <pogonyshev@gmx.net> 72004-10-08 Paul Pogonyshev <pogonyshev@gmx.net>
2 8
3 * subr.el (make-progress-reporter, progress-reporter-update) 9 * subr.el (make-progress-reporter, progress-reporter-update)
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index 675444d7ba4..b7521ad8e91 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -234,6 +234,13 @@ we will act as though we couldn't find a full name in the address."
234 :version "21.4" 234 :version "21.4"
235 :group 'mail-extr) 235 :group 'mail-extr)
236 236
237(defcustom mail-extr-ignore-realname-equals-mailbox-name t
238"*Whether to ignore a name that is equal to the mailbox name.
239If true, then when the address is like \"Single <single@address.com>\"
240we will act as though we couldn't find a full name in the address."
241 :type 'boolean
242 :group 'mail-extr)
243
237;; Matches a leading title that is not part of the name (does not 244;; Matches a leading title that is not part of the name (does not
238;; contribute to uniquely identifying the person). 245;; contribute to uniquely identifying the person).
239(defcustom mail-extr-full-name-prefixes 246(defcustom mail-extr-full-name-prefixes
@@ -694,7 +701,7 @@ Unless NO-REPLACE is true, at each of the positions in LIST-SYMBOL
694 "Given an RFC-822 address ADDRESS, extract full name and canonical address. 701 "Given an RFC-822 address ADDRESS, extract full name and canonical address.
695Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). 702Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
696If no name can be extracted, FULL-NAME will be nil. Also see 703If no name can be extracted, FULL-NAME will be nil. Also see
697`mail-extr-ignore-single-names'. 704`mail-extr-ignore-single-names' and `mail-extr-ignore-realname-equals-mailbox-name'.
698 705
699If the optional argument ALL is non-nil, then ADDRESS can contain zero 706If the optional argument ALL is non-nil, then ADDRESS can contain zero
700or more recipients, separated by commas, and we return a list of 707or more recipients, separated by commas, and we return a list of
@@ -1404,8 +1411,9 @@ consing a string.)"
1404 (setq names-match-flag nil)) 1411 (setq names-match-flag nil))
1405 (setq i (1+ i))) 1412 (setq i (1+ i)))
1406 (delete-region (+ (point-min) buffer-length) (point-max)) 1413 (delete-region (+ (point-min) buffer-length) (point-max))
1407 (if names-match-flag 1414 (and names-match-flag
1408 (narrow-to-region (point) (point))))) 1415 mail-extr-ignore-realname-equals-mailbox-name
1416 (narrow-to-region (point) (point)))))
1409 1417
1410 ;; Nuke name if it's just one word. 1418 ;; Nuke name if it's just one word.
1411 (goto-char (point-min)) 1419 (goto-char (point-min))