aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMark Lillibridge2011-01-01 18:43:26 -0800
committerGlenn Morris2011-01-01 18:43:26 -0800
commit9430e9882e6331ea9fa300b44b3c980faa711ac0 (patch)
treeb7734bbb2055c04946cfa8c765a11357bbdeece3 /lisp
parent8de31eeccbb63764ea3fb95eba819282e3cd92cd (diff)
downloademacs-9430e9882e6331ea9fa300b44b3c980faa711ac0.tar.gz
emacs-9430e9882e6331ea9fa300b44b3c980faa711ac0.zip
Mail-utils fix for bug#7746. (tiny change)
* lisp/mail/mail-utils.el (mail-strip-quoted-names): Avoid clobbering an existing temp buffer.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/mail-utils.el6
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 88295cb6a1c..cc6eb24b816 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-01-02 Mark Lillibridge <mark.lillibridge@hp.com> (tiny change)
2
3 * mail/mail-utils.el (mail-strip-quoted-names): Avoid clobbering
4 an existing temp buffer. (Bug#7746)
5
12011-01-02 Glenn Morris <rgm@gnu.org> 62011-01-02 Glenn Morris <rgm@gnu.org>
2 7
3 * mail/mail-utils.el (mail-mbox-from): Handle From: headers with 8 * mail/mail-utils.el (mail-mbox-from): Handle From: headers with
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index 19ddada1025..ce3036390c9 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -189,8 +189,7 @@ Return a modified address list."
189 ;; Detect nested comments. 189 ;; Detect nested comments.
190 (if (string-match "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*(" address) 190 (if (string-match "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*(" address)
191 ;; Strip nested comments. 191 ;; Strip nested comments.
192 (with-current-buffer (get-buffer-create " *temp*") 192 (with-temp-buffer
193 (erase-buffer)
194 (insert address) 193 (insert address)
195 (set-syntax-table lisp-mode-syntax-table) 194 (set-syntax-table lisp-mode-syntax-table)
196 (goto-char 1) 195 (goto-char 1)
@@ -203,8 +202,7 @@ Return a modified address list."
203 (forward-sexp 1) 202 (forward-sexp 1)
204 (error (goto-char (point-max)))) 203 (error (goto-char (point-max))))
205 (point)))) 204 (point))))
206 (setq address (buffer-string)) 205 (setq address (buffer-string)))
207 (erase-buffer))
208 ;; Strip non-nested comments an easier way. 206 ;; Strip non-nested comments an easier way.
209 (while (setq pos (string-match 207 (while (setq pos (string-match
210 ;; This doesn't hack rfc822 nested comments 208 ;; This doesn't hack rfc822 nested comments