From b3e484d7c46ec281d58e5d689d2eed4e6c8debb5 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 16 Mar 2005 13:12:47 +0000 Subject: [PATCH] (add-minor-mode): Use the new :minor-mode-function property. --- lisp/ChangeLog | 11 +++++++++-- lisp/subr.el | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3e35a60aa8f..30bb4d5cd36 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-03-16 Stefan Monnier + + * help.el (describe-mode): Allow a :minor-mode-function property to + specify a different minor mode toggle function than the variable. + * simple.el (auto-fill-function): + * subr.el (add-minor-mode): Use it. + 2005-03-16 Kenichi Handa * language/ethio-util.el (sera-being-called-by-w3): New variable. @@ -32,7 +39,7 @@ * isearch.el (isearch-error): New variable. (isearch-invalid-regexp, isearch-within-brackets): Remove. - (isearch-error-state): Renamed from `isearch-invalid-regexp-state'. + (isearch-error-state): Rename from `isearch-invalid-regexp-state'. (isearch-within-brackets-state): Remove. (isearch-case-fold-search-state, isearch-pop-fun-state): Decrease frame index. @@ -73,7 +80,7 @@ * international/mule-cmds.el (locale-language-names): Modify the format of elements and add more entries. (locale-preferred-coding-systems): Add more entries. - (set-locale-environment): Adjusted for the change of + (set-locale-environment): Adjust for the change of locale-language-names. 2005-03-14 Stefan Monnier diff --git a/lisp/subr.el b/lisp/subr.el index 8badf7cf777..b9e7786cfe4 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2457,6 +2457,8 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label." (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))) -- 2.39.2