summaryrefslogtreecommitdiff
path: root/lisp/gnus/nneething.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/nneething.el')
-rw-r--r--lisp/gnus/nneething.el12
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el
index 2f05c7e7900..bd5bfba0468 100644
--- a/lisp/gnus/nneething.el
+++ b/lisp/gnus/nneething.el
@@ -81,8 +81,7 @@ included.")
(deffoo nneething-retrieve-headers (articles &optional group server fetch-old)
(nneething-possibly-change-directory group)
- (save-excursion
- (set-buffer nntp-server-buffer)
+ (with-current-buffer nntp-server-buffer
(erase-buffer)
(let* ((number (length articles))
(count 0)
@@ -323,8 +322,7 @@ included.")
(if (equal '(0 0) (nth 5 atts)) ""
(concat "Date: " (current-time-string (nth 5 atts)) "\n"))
(or (when buffer
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(when (re-search-forward "<[a-zA-Z0-9_]@[-a-zA-Z0-9_]>" 1000 t)
(concat "From: " (match-string 0) "\n"))))
(nneething-from-line (nth 2 atts) file))
@@ -332,8 +330,7 @@ included.")
(concat "Chars: " (int-to-string (nth 7 atts)) "\n")
"")
(if buffer
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(concat "Lines: " (int-to-string
(count-lines (point-min) (point-max)))
"\n"))
@@ -382,8 +379,7 @@ included.")
(defun nneething-get-head (file)
"Either find the head in FILE or make a head for FILE."
- (save-excursion
- (set-buffer (get-buffer-create nneething-work-buffer))
+ (with-current-buffer (get-buffer-create nneething-work-buffer)
(setq case-fold-search nil)
(buffer-disable-undo)
(erase-buffer)