diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-08-16 19:40:41 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-08-16 19:40:41 +0000 |
commit | 3bdb5fb8e0f805f131117505a33889543d79add5 (patch) | |
tree | 0002c91e7c9bac3514383aa4e19cb4359ce6fabf /lisp/msb.el | |
parent | 1c2eababcbc1d202df06a2abe99fe9c2b97f9cdd (diff) | |
download | emacs-3bdb5fb8e0f805f131117505a33889543d79add5.tar.gz |
(msb-mode): Define it in terms of define-minor-mode.
Diffstat (limited to 'lisp/msb.el')
-rw-r--r-- | lisp/msb.el | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/lisp/msb.el b/lisp/msb.el index 463d6edbc8f..119ec7f17f6 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -201,19 +201,6 @@ :prefix "msb-" :group 'mouse) -;;;###autoload -(defcustom msb-mode nil - "Toggle msb-mode. -Setting this variable directly does not take effect; -use either \\[customize] or the function `msb-mode'." - :set (lambda (symbol value) - (msb-mode (or value 0))) - :initialize 'custom-initialize-default - :version "20.4" - :type 'boolean - :group 'msb - :require 'msb) - (defun msb-custom-set (symbol value) "Set the value of custom variables for msb." (set symbol value) @@ -1151,15 +1138,12 @@ variable `msb-menu-cond'." map)) ;;;###autoload -(defun msb-mode (&optional arg) +(define-minor-mode msb-mode "Toggle Msb mode. With arg, turn Msb mode on if and only if arg is positive. This mode overrides the binding(s) of `mouse-buffer-menu' to provide a different buffer menu using the function `msb'." - (interactive "P") - (setq msb-mode (if arg - (> (prefix-numeric-value arg) 0) - (not msb-mode))) + nil nil nil :global t (if msb-mode (progn (add-hook 'menu-bar-update-hook 'msb-menu-bar-update-buffers) @@ -1171,8 +1155,6 @@ different buffer menu using the function `msb'." (defun msb-unload-hook () (msb-mode 0)) -(add-to-list 'minor-mode-map-alist (cons 'msb-mode msb-mode-map)) - (provide 'msb) (eval-after-load 'msb (run-hooks 'msb-after-load-hooks)) |