diff options
Diffstat (limited to 'lisp/gnus/gnus-util.el')
-rw-r--r-- | lisp/gnus/gnus-util.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index e4bc9b900c2..31421cc7555 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -109,12 +109,6 @@ This is a compatibility function for different Emacsen." (defsubst gnus-goto-char (point) (and point (goto-char point))) -(defmacro gnus-buffer-exists-p (buffer) - `(let ((buffer ,buffer)) - (when buffer - (funcall (if (stringp buffer) 'get-buffer 'buffer-name) - buffer)))) - (defun gnus-delete-first (elt list) "Delete by side effect the first occurrence of ELT as a member of LIST." (if (equal (car list) elt) @@ -562,8 +556,12 @@ If N, return the Nth ancestor instead." (match-string 1 references)))))) (defsubst gnus-buffer-live-p (buffer) - "Say whether BUFFER is alive or not." - (and buffer (buffer-live-p (get-buffer buffer)))) + "If BUFFER names a live buffer, return its object; else nil." + (and buffer (buffer-live-p (setq buffer (get-buffer buffer))) + buffer)) + +(define-obsolete-function-alias 'gnus-buffer-exists-p + 'gnus-buffer-live-p "27.1") (defun gnus-horizontal-recenter () "Recenter the current buffer horizontally." |