]> git.eshelyaron.com Git - emacs.git/commitdiff
Use with-current-buffer.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 23 Aug 2007 18:27:41 +0000 (18:27 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 23 Aug 2007 18:27:41 +0000 (18:27 +0000)
(gnus-pick-setup-message): Fix long-standing typo.

lisp/gnus/ChangeLog
lisp/gnus/gnus-salt.el

index 201b7fefdcb0d56d1fbf85b6b8a898c64f01f380..3e234161c3e6c0a96fd0ede774ec3d3103a19220 100644 (file)
@@ -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>
 
index 298b6dc4739d44847ec0269507dbd3303ea9a3c4..e8d3e332ba3a3e857e1e6f17f27459f210914da4 100644 (file)
@@ -134,11 +134,10 @@ It accepts the same format specs that `gnus-summary-line-format' does."
 (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 @@ Two predefined functions are available:
   (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 @@ Two predefined functions are available:
 
 (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 @@ Two predefined functions are available:
   "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 @@ Two predefined functions are available:
 
 (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 @@ Two predefined functions are available:
 
 (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 @@ Two predefined functions are available:
 (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 @@ Two predefined functions are available:
          (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 @@ The following commands are available:
   (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)))