;;; msb.el --- customizable buffer-selection with multiple menus
-;; Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002,
-;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 1997-2012 Free Software Foundation, Inc.
;; Author: Lars Lindberg <lars.lindberg@home.se>
;; Maintainer: FSF
:group 'msb)
(defvar msb-files-by-directory-sort-key 0
- "*The sort key for files sorted by directory.")
+ "The sort key for files sorted by directory.")
(defcustom msb-max-menu-items 15
"The maximum number of items in a menu.
:set 'msb-custom-set
:group 'msb)
-(defvar msb-horizontal-shift-function '(lambda () 0)
- "*Function that specifies how many pixels to shift the top menu leftwards.")
+(defvar msb-horizontal-shift-function (lambda () 0)
+ "Function that specifies how many pixels to shift the top menu leftwards.")
(defcustom msb-display-invisible-buffers-p nil
"Show invisible buffers or not.
:group 'msb)
(defvar msb-item-handling-function 'msb-item-handler
- "*The appearance of a buffer menu.
+ "The appearance of a buffer menu.
The default function to call for handling the appearance of a menu
item. It should take two arguments, BUFFER and MAX-BUFFER-NAME-LENGTH,
:set 'msb-custom-set
:group 'msb)
+(define-obsolete-variable-alias 'msb-after-load-hooks
+ 'msb-after-load-hook "24.1")
+
(defcustom msb-after-load-hook nil
"Hook run after the msb package has been loaded."
:type 'hook
(format "%s%s %s" modified read-only name)))
-(eval-when-compile (require 'dired))
-
;; `dired' can be called with a list of the form (directory file1 file2 ...)
;; which causes `dired-directory' to be in the same form.
(defun msb--dired-directory ()
(list (frame-parameter frame 'name)
(frame-parameter frame 'name)
(cons nil nil))
- 'menu-bar-select-frame))
+ `(lambda ()
+ (interactive) (menu-bar-select-frame ,frame))))
frames)))))
(setcdr global-buffers-menu-map
(if (and buffers-menu frames-menu)
;;;###autoload
(define-minor-mode msb-mode
"Toggle Msb mode.
-With arg, turn Msb mode on if and only if arg is positive.
+With a prefix argument ARG, enable Msb mode if ARG is positive,
+and disable it otherwise. If called from Lisp, enable the mode
+if ARG is omitted or nil.
+
This mode overrides the binding(s) of `mouse-buffer-menu' to provide a
different buffer menu using the function `msb'."
:global t :group 'msb
nil)
(provide 'msb)
-(eval-after-load "msb" '(run-hooks 'msb-after-load-hook 'msb-after-load-hooks))
+(run-hooks 'msb-after-load-hook)
-;; arch-tag: 403f9e82-b92e-4e7a-a797-5d6d9b76da36
;;; msb.el ends here