changeset 60646:b8d318a41aae

(add-minor-mode): Use the new :minor-mode-function property.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 16 Mar 2005 13:12:04 +0000
parents b532848a1806
children dfd33934046f
files lisp/subr.el
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Wed Mar 16 13:11:34 2005 +0000
+++ b/lisp/subr.el	Wed Mar 16 13:12:04 2005 +0000
@@ -2457,6 +2457,8 @@
     (push toggle minor-mode-list))
 
   (unless toggle-fun (setq toggle-fun toggle))
+  (unless (eq toggle-fun toggle)
+    (put toggle :minor-mode-function toggle-fun))
   ;; Add the name to the minor-mode-alist.
   (when name
     (let ((existing (assq toggle minor-mode-alist)))