From 497afe074a541bdf40c456106c46d1938014d922 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 1 Apr 2008 08:36:57 +0000 Subject: [PATCH] (abbrev-mode): Use define-minor-mode. --- lisp/ChangeLog | 2 ++ lisp/abbrev.el | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca9da31080e..cf054e11340 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2008-04-01 Stefan Monnier + * abbrev.el (abbrev-mode): Use define-minor-mode. + * mouse.el (mouse-major-mode-menu-prefix): Remove. Remove uses. (mouse-menu-non-singleton): Rename from mouse-major-mode-menu-1. Use map-keymap. diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 1f0b28cfb97..da09401504d 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -49,16 +49,11 @@ define global abbrevs instead." :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. -- 2.39.5