From 06e9c2d94ef8e7cd0998bd610edcffbd1b09ff98 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 19 Mar 2011 00:48:04 +0000 Subject: [PATCH] gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p. (gnus-buffer-live-p): Check that buffer is not nil. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-util.el | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 04b80159e50..7eca03bd93b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-03-18 Julien Danjou + + * gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p. + (gnus-buffer-live-p): Check that buffer is not nil. + 2011-03-17 Lars Magne Ingebrigtsen * gnus-art.el: Require mouse, which the build bot seems to say is diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 42dbd5948cf..3f66b45aaab 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -672,11 +672,9 @@ If N, return the Nth ancestor instead." (when (string-match "\\(<[^<]+>\\)[ \t]*\\'" references) (match-string 1 references)))))) -(defun gnus-buffer-live-p (buffer) +(defsubst gnus-buffer-live-p (buffer) "Say whether BUFFER is alive or not." - (and buffer - (get-buffer buffer) - (buffer-name (get-buffer buffer)))) + (and buffer (buffer-live-p (get-buffer buffer)))) (defun gnus-horizontal-recenter () "Recenter the current buffer horizontally." -- 2.39.2