diff lisp/abbrev.el @ 93513:b97d6aea2d95

(abbrev-mode): Use define-minor-mode.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 01 Apr 2008 08:36:57 +0000
parents 73a01bf5cb80
children ad63f799c98d
line wrap: on
line diff
--- a/lisp/abbrev.el	Tue Apr 01 08:35:58 2008 +0000
+++ b/lisp/abbrev.el	Tue Apr 01 08:36:57 2008 +0000
@@ -49,16 +49,11 @@
   :group 'abbrev-mode
   :group 'convenience)
 
-(defun abbrev-mode (&optional arg)
+(define-minor-mode abbrev-mode
   "Toggle Abbrev mode in the current buffer.
 With optional argument ARG, turn abbrev mode on if ARG is
 positive, otherwise turn it off.  In Abbrev mode, inserting an
-abbreviation causes it to expand and be replaced by its expansion."
-  (interactive "P")
-  (setq abbrev-mode
-	(if (null arg) (not abbrev-mode)
-	  (> (prefix-numeric-value arg) 0)))
-  (force-mode-line-update))
+abbreviation causes it to expand and be replaced by its expansion.")
 
 (defcustom abbrev-mode nil
   "Enable or disable Abbrev mode.