From: Julien Danjou Date: Sat, 19 Mar 2011 00:48:04 +0000 (+0000) Subject: gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~548 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=06e9c2d94ef8e7cd0998bd610edcffbd1b09ff98;p=emacs.git gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p. (gnus-buffer-live-p): Check that buffer is not nil. --- 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."