mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(mail-strip-quoted-names):
Delete comments, then delete leading/trailing whitespace.
This commit is contained in:
parent
fd88fe732d
commit
ee019c842f
1 changed files with 7 additions and 6 deletions
|
|
@ -112,12 +112,6 @@ Return a modified address list."
|
|||
(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 @@ Return a modified address list."
|
|||
(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue