+2003-02-12 Jesper Harder <harder@ifa.au.dk>
+
+ * gnus.el (gnus-kill-buffer): Move to gnus.el because it's
+ logically the complement of gnus-get-buffer-create and
+ gnus-add-buffer.
+
+ * gnus-util.el (gnus-kill-buffer): do.
+
+ * nnmail.el: Autoload gnus-kill-buffer.
+
2002-02-11 Kevin Greiner <kgreiner@xpediantsolutions.com>
* gnus-agent.el (gnus-summary-set-agent-mark): Added call to
(funcall (if (stringp buffer) 'get-buffer 'buffer-name)
buffer))))
-(defmacro gnus-kill-buffer (buffer)
- `(let ((buf ,buffer))
- (when (gnus-buffer-exists-p buf)
- (when (boundp 'gnus-buffers)
- (setq gnus-buffers (delete (get-buffer buf) gnus-buffers)))
- (kill-buffer buf))))
-
(static-cond
((fboundp 'point-at-bol)
(defalias 'gnus-point-at-bol 'point-at-bol))
"Add the current buffer to the list of Gnus buffers."
(push (current-buffer) gnus-buffers))
+(defmacro gnus-kill-buffer (buffer)
+ "Kill BUFFER and remove from the list of Gnus buffers."
+ `(let ((buf ,buffer))
+ (when (gnus-buffer-exists-p buf)
+ (setq gnus-buffers (delete (get-buffer buf) gnus-buffers))
+ (kill-buffer buf))))
+
(defun gnus-buffers ()
"Return a list of live Gnus buffers."
(while (and gnus-buffers
(require 'mail-source)
(eval-and-compile
- (autoload 'gnus-add-buffer "gnus"))
+ (autoload 'gnus-add-buffer "gnus")
+ (autoload 'gnus-kill-buffer "gnus"))
(defgroup nnmail nil
"Reading mail with Gnus."