changeset 22002:c40d3d44e6fd

(mail-strip-quoted-names): Delete comments, then delete leading/trailing whitespace.
author Richard M. Stallman <rms@gnu.org>
date Sat, 09 May 1998 06:40:53 +0000
parents e35aafba190f
children ea83fc4c4f77
files lisp/mail/mail-utils.el
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mail-utils.el	Sat May 09 04:59:22 1998 +0000
+++ b/lisp/mail/mail-utils.el	Sat May 09 06:40:53 1998 +0000
@@ -112,12 +112,6 @@
 	(progn (require 'rfc822)
 	       (mapconcat 'identity (rfc822-addresses address) ", "))
       (let (pos)
-       (string-match "\\`[ \t\n]*" address)
-       ;; strip surrounding whitespace
-       (setq address (substring address
-				(match-end 0)
-				(string-match "[ \t\n]*\\'" address
-					      (match-end 0))))
 
        ;; Detect nested comments.
        (if (string-match "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*(" address)
@@ -149,6 +143,13 @@
 		 (mail-string-delete address
 				     pos (match-end 0)))))
 
+       ;; strip surrounding whitespace
+       (string-match "\\`[ \t\n]*" address)
+       (setq address (substring address
+				(match-end 0)
+				(string-match "[ \t\n]*\\'" address
+					      (match-end 0))))
+
        ;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>')
        (setq pos 0)
        (while (setq pos (string-match