emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/subr.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/subr.el
Date: Tue, 08 Apr 2003 21:36:28 -0400

Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.348 emacs/lisp/subr.el:1.349
*** emacs/lisp/subr.el:1.348    Fri Apr  4 21:13:44 2003
--- emacs/lisp/subr.el  Tue Apr  8 21:36:28 2003
***************
*** 2094,2099 ****
--- 2094,2107 ----
        (set-default-file-modes umask))))
  
  
+ ;; If a minor mode is not defined with define-minor-mode,
+ ;; add it here explicitly.
+ ;; isearch-mode is deliberately excluded, since you should
+ ;; not call it yourself.
+ (defvar minor-mode-list '(auto-save-mode auto-fill-mode abbrev-mode
+                                        overwrite-mode view-mode)
+   "List of all minor mode functions.")
+ 
  (defun add-minor-mode (toggle name &optional keymap after toggle-fun)
    "Register a new minor mode.
  
***************
*** 2118,2123 ****
--- 2126,2134 ----
  If TOGGLE has a non-nil `:included' property, an entry for the mode is
  included in the mode-line minor mode menu.
  If TOGGLE has a `:menu-tag', that is used for the menu item's label."
+   (unless (memq toggle minor-mode-list)
+     (push toggle minor-mode-list))
+     
    (unless toggle-fun (setq toggle-fun toggle))
    ;; Add the name to the minor-mode-alist.
    (when name




reply via email to

[Prev in Thread] Current Thread [Next in Thread]