summaryrefslogtreecommitdiff
path: root/lisp/msb.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2000-08-16 19:40:41 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2000-08-16 19:40:41 +0000
commit3bdb5fb8e0f805f131117505a33889543d79add5 (patch)
tree0002c91e7c9bac3514383aa4e19cb4359ce6fabf /lisp/msb.el
parent1c2eababcbc1d202df06a2abe99fe9c2b97f9cdd (diff)
downloademacs-3bdb5fb8e0f805f131117505a33889543d79add5.tar.gz
(msb-mode): Define it in terms of define-minor-mode.
Diffstat (limited to 'lisp/msb.el')
-rw-r--r--lisp/msb.el22
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))