Mail-utils fix for bug#7746. (tiny change)
authorMark Lillibridge <mark.lillibridge@hp.com>
Sun, 2 Jan 2011 02:43:26 +0000 (18:43 -0800)
committerGlenn Morris <rgm@gnu.org>
Sun, 2 Jan 2011 02:43:26 +0000 (18:43 -0800)
* lisp/mail/mail-utils.el (mail-strip-quoted-names): Avoid clobbering
an existing temp buffer.

lisp/ChangeLog
lisp/mail/mail-utils.el

index 88295cb..cc6eb24 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-02  Mark Lillibridge  <mark.lillibridge@hp.com>  (tiny change)
+
+       * mail/mail-utils.el (mail-strip-quoted-names): Avoid clobbering
+       an existing temp buffer.  (Bug#7746)
+
 2011-01-02  Glenn Morris  <rgm@gnu.org>
 
        * mail/mail-utils.el (mail-mbox-from): Handle From: headers with
index 19ddada..ce30363 100644 (file)
@@ -189,8 +189,7 @@ Return a modified address list."
        ;; 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 @@ Return a modified address list."
                                    (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