# HG changeset patch # User Richard M. Stallman # Date 894696053 0 # Node ID c40d3d44e6fdf7616007be5c0365a476dda9ba6c # Parent e35aafba190f65f2d5207ab0a8da97b4fe2a5382 (mail-strip-quoted-names): Delete comments, then delete leading/trailing whitespace. diff -r e35aafba190f -r c40d3d44e6fd lisp/mail/mail-utils.el --- 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" ') (setq pos 0) (while (setq pos (string-match