changeset 78634:933891e04bae

Use with-current-buffer. (gnus-pick-setup-message): Fix long-standing typo.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 23 Aug 2007 18:27:41 +0000
parents 128c8e0c565e
children 65b448298f0c
files lisp/gnus/ChangeLog lisp/gnus/gnus-salt.el
diffstat 2 files changed, 26 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Thu Aug 23 18:25:48 2007 +0000
+++ b/lisp/gnus/ChangeLog	Thu Aug 23 18:27:41 2007 +0000
@@ -1,3 +1,15 @@
+2007-08-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* sha1.el: Fix up comment style.
+	(sha1-F0, sha1-F1, sha1-F2, sha1-F3, sha1-S1, sha1-S5, sha1-S30)
+	(sha1-OP, sha1-add-to-H): Use new-style backquotes.
+
+	* hex-util.el: Fix up comment style.
+	(hex-char-to-num, num-to-hex-char): Use new-style backquotes.
+
+	* gnus-salt.el: Use with-current-buffer.
+	(gnus-pick-setup-message): Fix long-standing typo.
+
 2007-08-17  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus-art.el (gnus-article-summary-command-nosave)
@@ -11,8 +23,8 @@
 	according to gnus-maximum-newsgroup.
 
 	* gnus-sum.el (gnus-articles-to-read, gnus-list-of-unread-articles)
-	(gnus-list-of-read-articles, gnus-sequence-of-unread-articles): Limit
-	the range of articles according to gnus-maximum-newsgroup.
+	(gnus-list-of-read-articles, gnus-sequence-of-unread-articles):
+	Limit the range of articles according to gnus-maximum-newsgroup.
 
 2007-08-10  Katsumi Yamaoka  <yamaoka@jpl.org>
 
--- a/lisp/gnus/gnus-salt.el	Thu Aug 23 18:25:48 2007 +0000
+++ b/lisp/gnus/gnus-salt.el	Thu Aug 23 18:27:41 2007 +0000
@@ -134,11 +134,10 @@
 (defun gnus-pick-setup-message ()
   "Make Message do the right thing on exit."
   (when (and (gnus-buffer-live-p gnus-summary-buffer)
-	     (save-excursion
-	       (set-buffer gnus-summary-buffer)
+	     (with-current-buffer gnus-summary-buffer
 	       gnus-pick-mode))
     (message-add-action
-     '(gnus-configure-windows ,gnus-current-window-configuration t)
+     `(gnus-configure-windows ,gnus-current-window-configuration t)
      'send 'exit 'postpone 'kill)))
 
 (defvar gnus-pick-line-number 1)
@@ -524,8 +523,7 @@
   (interactive (list (gnus-tree-article-number)))
   (let ((buf (current-buffer)))
     (when article
-      (save-excursion
-	(set-buffer gnus-summary-buffer)
+      (with-current-buffer gnus-summary-buffer
 	(gnus-summary-goto-article article))
       (select-window (get-buffer-window buf)))))
 
@@ -576,8 +574,7 @@
 
 (defun gnus-get-tree-buffer ()
   "Return the tree buffer properly initialized."
-  (save-excursion
-    (set-buffer (gnus-get-buffer-create gnus-tree-buffer))
+  (with-current-buffer (gnus-get-buffer-create gnus-tree-buffer)
     (unless (eq major-mode 'gnus-tree-mode)
       (gnus-tree-mode))
     (current-buffer)))
@@ -662,8 +659,7 @@
   "Highlight current line according to `gnus-summary-highlight'."
   (let ((list gnus-summary-highlight)
 	face)
-    (save-excursion
-      (set-buffer gnus-summary-buffer)
+    (with-current-buffer gnus-summary-buffer
       (let* ((score (or (cdr (assq article gnus-newsgroup-scored))
 			gnus-summary-default-score 0))
 	     (default gnus-summary-default-score)
@@ -690,8 +686,7 @@
 
 (defun gnus-generate-tree (thread)
   "Generate a thread tree for THREAD."
-  (save-excursion
-    (set-buffer (gnus-get-tree-buffer))
+  (with-current-buffer (gnus-get-tree-buffer)
     (let ((buffer-read-only nil)
 	  (gnus-tmp-indent 0))
       (erase-buffer)
@@ -814,14 +809,12 @@
 
 (defun gnus-possibly-generate-tree (article &optional force)
   "Generate the thread tree for ARTICLE if it isn't displayed already."
-  (when (save-excursion
-	  (set-buffer gnus-summary-buffer)
+  (when (with-current-buffer gnus-summary-buffer
 	  (and gnus-use-trees
 	       gnus-show-threads
 	       (vectorp (gnus-summary-article-header article))))
     (save-excursion
-      (let ((top (save-excursion
-		   (set-buffer gnus-summary-buffer)
+      (let ((top (with-current-buffer gnus-summary-buffer
 		   (gnus-cut-thread
 		    (gnus-remove-thread
 		     (mail-header-id
@@ -843,8 +836,7 @@
 (defun gnus-tree-perhaps-minimize ()
   (when (and gnus-tree-minimize-window
 	     (get-buffer gnus-tree-buffer))
-    (save-excursion
-      (set-buffer gnus-tree-buffer)
+    (with-current-buffer gnus-tree-buffer
       (gnus-tree-minimize))))
 
 (defun gnus-highlight-selected-tree (article)
@@ -871,14 +863,12 @@
 	  (gnus-horizontal-recenter)
 	  (select-window selected))))
 ;; If we remove this save-excursion, it updates the wrong mode lines?!?
-    (save-excursion
-      (set-buffer gnus-tree-buffer)
+    (with-current-buffer gnus-tree-buffer
       (gnus-set-mode-line 'tree))
     (set-buffer buf)))
 
 (defun gnus-tree-highlight-article (article face)
-  (save-excursion
-    (set-buffer (gnus-get-tree-buffer))
+  (with-current-buffer (gnus-get-tree-buffer)
     (let (region)
       (when (setq region (gnus-tree-article-region article))
 	(gnus-put-text-property (car region) (cdr region) 'face face)
@@ -1013,8 +1003,7 @@
   (let ((buffer (symbol-value (intern (format "gnus-carpal-%s-buffer" type)))))
     (if (get-buffer buffer)
 	()
-      (save-excursion
-	(set-buffer (gnus-get-buffer-create buffer))
+      (with-current-buffer (gnus-get-buffer-create buffer)
 	(gnus-carpal-mode)
 	(setq gnus-carpal-attached-buffer
 	      (intern (format "gnus-%s-buffer" type)))