summaryrefslogtreecommitdiff
path: root/lisp/gnus/nndoc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/nndoc.el')
-rw-r--r--lisp/gnus/nndoc.el9
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el
index 532ba11fa09..9c8cab597a6 100644
--- a/lisp/gnus/nndoc.el
+++ b/lisp/gnus/nndoc.el
@@ -309,8 +309,7 @@ from the document.")
(deffoo nndoc-close-group (group &optional server)
(nndoc-possibly-change-buffer group server)
- (and nndoc-current-buffer
- (buffer-name nndoc-current-buffer)
+ (and (buffer-live-p nndoc-current-buffer)
(kill-buffer nndoc-current-buffer))
(setq nndoc-group-alist (delq (assoc group nndoc-group-alist)
nndoc-group-alist))
@@ -335,8 +334,7 @@ from the document.")
(let (buf)
(cond
;; The current buffer is this group's buffer.
- ((and nndoc-current-buffer
- (buffer-name nndoc-current-buffer)
+ ((and (buffer-live-p nndoc-current-buffer)
(eq nndoc-current-buffer
(setq buf (cdr (assoc group nndoc-group-alist))))))
;; We change buffers by taking an old from the group alist.
@@ -344,8 +342,7 @@ from the document.")
(buf
(setq nndoc-current-buffer buf))
;; It's a totally new group.
- ((or (and (bufferp nndoc-address)
- (buffer-name nndoc-address))
+ ((or (buffer-live-p nndoc-address)
(and (stringp nndoc-address)
(file-exists-p nndoc-address)
(not (file-directory-p nndoc-address))))