+2004-04-17 Jesper Harder <harder@ifa.au.dk>
+
+ * gnus-sum.el (gnus-set-global-variables)
+ (gnus-build-all-threads, gnus-get-newsgroup-headers)
+ (gnus-article-get-xrefs, gnus-summary-best-group)
+ (gnus-summary-next-article, gnus-summary-enter-digest-group)
+ (gnus-summary-set-bookmark, gnus-offer-save-summaries)
+ (gnus-summary-update-info, gnus-kill-or-deaden-summary): Use
+ with-current-buffer.
+
2004-04-16 Teodor Zlatanov <tzz@lifelogs.com>
* spam.el (spam-summary-prepare-exit): simplified logic
2004-04-16 Jesper Harder <harder@ifa.au.dk>
* message.el (message-cater-to-broken-inn): Remove.
- (message-shorten-references): Make the total folded length of
+ (message-shorten-references): Make sure the total folded length of
References is shorter than 998 characters to cater to a bug in INN
2.3. Also, don't pretend that references aren't folded -- this
hasn't worked for a while.
(push (eval (car locals)) vlist))
(setq locals (cdr locals)))
(setq vlist (nreverse vlist)))
- (save-excursion
- (set-buffer gnus-group-buffer)
+ (with-current-buffer gnus-group-buffer
(setq gnus-newsgroup-name name
gnus-newsgroup-marked marked
gnus-newsgroup-spam-marked spam
(setq article (read (current-buffer))
header (gnus-nov-parse-line article dependencies)))
(when header
- (save-excursion
- (set-buffer gnus-summary-buffer)
+ (with-current-buffer gnus-summary-buffer
(push header gnus-newsgroup-headers)
(if (memq (setq article (mail-header-number header))
gnus-newsgroup-unselected)
(let ((cur nntp-server-buffer)
(dependencies
(or dependencies
- (save-excursion (set-buffer gnus-summary-buffer)
- gnus-newsgroup-dependencies)))
+ (with-current-buffer gnus-summary-buffer
+ gnus-newsgroup-dependencies)))
headers id end ref
(mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets
(defun gnus-article-get-xrefs ()
"Fill in the Xref value in `gnus-current-headers', if necessary.
This is meant to be called in `gnus-article-internal-prepare-hook'."
- (let ((headers (save-excursion (set-buffer gnus-summary-buffer)
- gnus-current-headers)))
+ (let ((headers (with-current-buffer gnus-summary-buffer
+ gnus-current-headers)))
(or (not gnus-use-cross-reference)
(not headers)
(and (mail-header-xref headers)
(defun gnus-summary-best-group (&optional exclude-group)
"Find the name of the best unread group.
If EXCLUDE-GROUP, do not go to this group."
- (save-excursion
- (set-buffer gnus-group-buffer)
+ (with-current-buffer gnus-group-buffer
(save-excursion
(gnus-group-best-unread-group exclude-group))))
(setq gnus-newsgroup-killed (list gnus-newsgroup-killed)))
(let ((headers gnus-newsgroup-headers))
;; Set the new ranges of read articles.
- (save-excursion
- (set-buffer gnus-group-buffer)
+ (with-current-buffer gnus-group-buffer
(gnus-undo-force-boundary))
(gnus-update-read-articles
group (gnus-sorted-union
;; Kill any previous dead summary buffer.
(when (and gnus-dead-summary
(buffer-name gnus-dead-summary))
- (save-excursion
- (set-buffer gnus-dead-summary)
+ (with-current-buffer gnus-dead-summary
(when gnus-dead-summary-mode
(kill-buffer (current-buffer)))))
;; Make this the current dead summary.
(save-excursion
(when (and (buffer-name buffer)
(not gnus-single-article-buffer))
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(gnus-kill-buffer gnus-article-buffer)
(gnus-kill-buffer gnus-original-article-buffer)))
(cond
(gnus-summary-jump-to-group gnus-newsgroup-name))
(let ((cmd last-command-char)
(point
- (save-excursion
- (set-buffer gnus-group-buffer)
+ (with-current-buffer gnus-group-buffer
(point)))
(group
(if (eq gnus-keep-same-level 'best)
(let* ((name (format "%s-%d"
(gnus-group-prefixed-name
gnus-newsgroup-name (list 'nndoc ""))
- (save-excursion
- (set-buffer gnus-summary-buffer)
+ (with-current-buffer gnus-summary-buffer
gnus-current-article)))
(ogroup gnus-newsgroup-name)
(params (append (gnus-info-params (gnus-get-info ogroup))
;; (article-number . line-number-in-body).
(push
(cons article
- (save-excursion
- (set-buffer gnus-article-buffer)
+ (with-current-buffer gnus-article-buffer
(count-lines
(min (point)
(save-excursion
(dolist (buffer (buffer-list))
(when (and (setq buffer (buffer-name buffer))
(string-match "Summary" buffer)
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
;; We check that this is, indeed, a summary buffer.
(and (eq major-mode 'gnus-summary-mode)
;; Also make sure this isn't bogus.