diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2019-05-05 01:28:57 +0100 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2019-05-30 02:56:28 +0100 |
commit | ceca1740ea2c9bc98da8c11765b78c696b27c79e (patch) | |
tree | 8f878809e34325af181edac66385307345c3ef03 /lisp/gnus/gnus-msg.el | |
parent | 46a176169b9050a5e6d97b11f265bd58b4b5eb05 (diff) | |
download | emacs-ceca1740ea2c9bc98da8c11765b78c696b27c79e.tar.gz |
Simplify Gnus buffer liveness checking and killing
* lisp/gnus/gnus-agent.el (gnus-agent-synchronize-group-flags):
Fix indentation.
* lisp/gnus/gnus-util.el (gnus-buffer-exists-p): Define as obsolete
alias of gnus-buffer-live-p.
(gnus-buffer-live-p): If the given argument is or names a live
buffer, return the corresponding buffer object instead of a boolean.
* lisp/gnus/gnus-win.el (gnus-delete-windows-in-gnusey-frames)
(gnus-remove-some-windows): Simplify.
* lisp/gnus/gnus.el (gnus-prune-buffers): Redefine as alias of
gnus-buffers.
(gnus-kill-buffer, gnus-buffers, gnus-group-find-parameter):
* lisp/gnus/gnus-art.el (gnus-kill-sticky-article-buffers)
(gnus-request-article-this-buffer):
* lisp/gnus/gnus-bcklg.el (gnus-backlog-shutdown):
* lisp/gnus/gnus-cus.el (gnus-group-customize)
(gnus-agent-customize-category):
* lisp/gnus/gnus-draft.el (gnus-draft-edit-message):
* lisp/gnus/gnus-group.el (gnus-group-set-mode-line)
(gnus--abort-on-unsaved-message-buffers, gnus-group-compact-group):
* lisp/gnus/gnus-msg.el (gnus-inews-add-send-actions)
(gnus-summary-supersede-article, gnus-copy-article-buffer):
* lisp/gnus/gnus-score.el (gnus-score-edit-current-scores)
(gnus-score-edit-file):
* lisp/gnus/gnus-spec.el (gnus-update-format-specifications):
* lisp/gnus/gnus-srvr.el (gnus-server-compact-server):
* lisp/gnus/gnus-start.el (gnus-clear-system, gnus-dribble-enter)
(gnus-dribble-save, gnus-dribble-clear, gnus-save-newsrc-file):
* lisp/gnus/gnus-sum.el (gnus-summary-setup-buffer)
(gnus-update-summary-mark-positions, gnus-summary-exit)
(gnus-deaden-summary, gnus-kill-or-deaden-summary)
(gnus-summary-next-group):
* lisp/gnus/gnus-win.el (gnus-configure-frame):
* lisp/gnus/mail-source.el (mail-source-movemail):
* lisp/gnus/message.el (message-with-reply-buffer)
(message-with-reply, message-send-and-exit)
(message-send-mail-with-sendmail, message-pop-to-buffer)
(message-do-send-housekeeping, message-forward-make-body-plain)
(message-forward-make-body-mml):
* lisp/gnus/mm-decode.el (mm-display-external, mm-remove-part):
* lisp/gnus/nnbabyl.el (nnbabyl-server-opened)
(nnbabyl-possibly-change-newsgroup, nnbabyl-read-mbox)
(nnbabyl-check-mbox):
* lisp/gnus/nndiary.el (nndiary-save-nov):
* lisp/gnus/nndoc.el (nndoc-close-group)
(nndoc-possibly-change-buffer):
* lisp/gnus/nnfolder.el (nnfolder-close-group, nnfolder-save-nov):
* lisp/gnus/nnimap.el (nnimap-make-process-buffer, nnimap-keepalive)
(nnimap-find-connection):
* lisp/gnus/nnmail.el (nnmail-cache-open, nnmail-cache-close):
* lisp/gnus/nnmbox.el (nnmbox-close-server, nnmbox-server-opened)
(nnmbox-possibly-change-newsgroup, nnmbox-read-mbox):
* lisp/gnus/nnml.el (nnml-save-incremental-nov, nnml-open-nov)
(nnml-save-nov):
* lisp/gnus/nnoo.el (nnoo-server-opened):
* lisp/gnus/nntp.el (nntp-kill-buffer, nntp-make-process-buffer)
(nntp-open-connection, nntp-async-trigger):
* lisp/net/mairix.el (mairix-gnus-fetch-field): Simplify buffer
liveness checking and killing, replacing buffer-name with
buffer-live-p and gnus-buffer-exists-p with gnus-buffer-live-p or
equivalent where applicable.
Diffstat (limited to 'lisp/gnus/gnus-msg.el')
-rw-r--r-- | lisp/gnus/gnus-msg.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index b7a97f19d00..0ae7fe2efc1 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -607,7 +607,7 @@ instead." (message-add-action `(progn (setq gnus-current-window-configuration ',winconf-name) - (when (gnus-buffer-exists-p ,buffer) + (when (gnus-buffer-live-p ,buffer) (set-window-configuration ,winconf))) 'exit 'postpone 'kill) (let ((to-be-marked (cond @@ -617,7 +617,7 @@ instead." (article (if (listp article) article (list article))) (t nil)))) (message-add-action - `(when (gnus-buffer-exists-p ,buffer) + `(when (gnus-buffer-live-p ,buffer) (with-current-buffer ,buffer ,(when to-be-marked (if (eq config 'forward) @@ -902,7 +902,7 @@ header line with the old Message-ID." (message-supersede) (push `((lambda () - (when (gnus-buffer-exists-p ,gnus-summary-buffer) + (when (gnus-buffer-live-p ,gnus-summary-buffer) (with-current-buffer ,gnus-summary-buffer (gnus-cache-possibly-remove-article ,article nil nil nil t) (gnus-summary-mark-as-read ,article gnus-canceled-mark))))) @@ -922,8 +922,7 @@ header line with the old Message-ID." (mm-enable-multibyte)) (let ((article-buffer (or article-buffer gnus-article-buffer)) end beg) - (if (not (and (get-buffer article-buffer) - (gnus-buffer-exists-p article-buffer))) + (if (not (gnus-buffer-live-p article-buffer)) (error "Can't find any article buffer") (with-current-buffer article-buffer (let ((gnus-newsgroup-charset (or gnus-article-charset |