From: yamaoka Date: Fri, 23 Jan 2004 02:09:30 +0000 (+0000) Subject: Synch to No Gnus 200401230204. X-Git-Tag: t-gnus-6_17_4-quimby-~1111 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3dd9dcb6cd930cefd5cae0de67f92d53f8b5f538;p=elisp%2Fgnus.git- Synch to No Gnus 200401230204. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 73fbacf..e9255e7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2004-01-23 Jesper Harder + * spam-stat.el (spam-stat-store-gnus-article-buffer): Use + with-current-buffer. + (spam-stat-store-current-buffer): Use insert-buffer-substring to + avoid consing a string. + * mm-util.el (mm-charset-synonym-alist): Add ks_c_5601-1987. Remove obsolete entries for big5 and gb2312. diff --git a/lisp/spam-stat.el b/lisp/spam-stat.el index b7b7cd2..9d43ef8 100644 --- a/lisp/spam-stat.el +++ b/lisp/spam-stat.el @@ -198,18 +198,16 @@ This is set by hooking into Gnus.") (defun spam-stat-store-current-buffer () "Store a copy of the current buffer in `spam-stat-buffer'." - (save-excursion - (let ((str (buffer-string))) - (set-buffer (get-buffer-create spam-stat-buffer-name)) + (let ((buf (current-buffer))) + (with-current-buffer (get-buffer-create spam-stat-buffer-name) (erase-buffer) - (insert str) + (insert-buffer-substring buf) (setq spam-stat-buffer (current-buffer))))) (defun spam-stat-store-gnus-article-buffer () "Store a copy of the current article in `spam-stat-buffer'. This uses `gnus-article-buffer'." - (save-excursion - (set-buffer gnus-original-article-buffer) + (with-current-buffer gnus-original-article-buffer (spam-stat-store-current-buffer))) ;; Data -- not using defstruct in order to save space and time