# HG changeset patch # User Glenn Morris # Date 1293936206 28800 # Node ID f8b430cb91a7ef9aa7e72564771b306d197437f6 # Parent c343ad0f54f79892bd88013f1ca19d67dd34977a Mail-utils fix for bug#7746. (tiny change) * lisp/mail/mail-utils.el (mail-strip-quoted-names): Avoid clobbering an existing temp buffer. diff -r c343ad0f54f7 -r f8b430cb91a7 lisp/ChangeLog --- a/lisp/ChangeLog Sat Jan 01 18:35:23 2011 -0800 +++ b/lisp/ChangeLog Sat Jan 01 18:43:26 2011 -0800 @@ -1,3 +1,8 @@ +2011-01-02 Mark Lillibridge (tiny change) + + * mail/mail-utils.el (mail-strip-quoted-names): Avoid clobbering + an existing temp buffer. (Bug#7746) + 2011-01-02 Glenn Morris * mail/mail-utils.el (mail-mbox-from): Handle From: headers with diff -r c343ad0f54f7 -r f8b430cb91a7 lisp/mail/mail-utils.el --- a/lisp/mail/mail-utils.el Sat Jan 01 18:35:23 2011 -0800 +++ b/lisp/mail/mail-utils.el Sat Jan 01 18:43:26 2011 -0800 @@ -189,8 +189,7 @@ ;; Detect nested comments. (if (string-match "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*(" address) ;; Strip nested comments. - (with-current-buffer (get-buffer-create " *temp*") - (erase-buffer) + (with-temp-buffer (insert address) (set-syntax-table lisp-mode-syntax-table) (goto-char 1) @@ -203,8 +202,7 @@ (forward-sexp 1) (error (goto-char (point-max)))) (point)))) - (setq address (buffer-string)) - (erase-buffer)) + (setq address (buffer-string))) ;; Strip non-nested comments an easier way. (while (setq pos (string-match ;; This doesn't hack rfc822 nested comments