]> code.delx.au - gnu-emacs/blobdiff - lisp/bs.el
Comment (minor header format fix).
[gnu-emacs] / lisp / bs.el
index 88d969f05a1bf3d4917064b6ace3de6ac96522dd..96bad48cf2acdba7a9c74bbb4c317ef457b63a7b 100644 (file)
@@ -1,7 +1,7 @@
 ;;; bs.el --- menu for selecting and displaying buffers
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 ;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
 ;; Maintainer: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
 ;; Keywords: convenience
@@ -815,8 +815,8 @@ Leave Buffer Selection Menu."
   "Save buffer on current line."
   (interactive)
   (with-current-buffer (bs--current-buffer)
-    (save-buffer)
-    (bs--update-current-line))
+    (save-buffer))
+  (bs--update-current-line))
 
 (defun bs-visit-tags-table ()
   "Visit the tags table in the buffer on this line.
@@ -1464,6 +1464,21 @@ name of buffer configuration."
   (setq bs--marked-buffers nil)
   (bs--show-with-configuration (bs--configuration-name-for-prefix-arg arg)))
 
+;; ----------------------------------------------------------------------
+;; Cleanup
+;; ----------------------------------------------------------------------
+
+(defun bs-unload-function ()
+  "Unload the Buffer Selection library."
+  (let ((bs-buf (get-buffer "*buffer-selection*")))
+    (when bs-buf
+      (with-current-buffer bs-buf
+       (when (eq major-mode 'bs-mode)
+         (bs-kill)
+         (kill-buffer bs-buf)))))
+  ;; continue standard unloading
+  nil)
+
 ;; Now provide feature bs
 (provide 'bs)