diff lisp/subr.el @ 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 9d1976b50f1c
children 7fd2729eec90 1830bcd0eec0 30ad2795fdab
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)))