2094 |
(set-default-file-modes umask)))) |
(set-default-file-modes umask)))) |
2095 |
|
|
2096 |
|
|
2097 |
|
;; If a minor mode is not defined with define-minor-mode, |
2098 |
|
;; add it here explicitly. |
2099 |
|
;; isearch-mode is deliberately excluded, since you should |
2100 |
|
;; not call it yourself. |
2101 |
|
(defvar minor-mode-list '(auto-save-mode auto-fill-mode abbrev-mode |
2102 |
|
overwrite-mode view-mode) |
2103 |
|
"List of all minor mode functions.") |
2104 |
|
|
2105 |
(defun add-minor-mode (toggle name &optional keymap after toggle-fun) |
(defun add-minor-mode (toggle name &optional keymap after toggle-fun) |
2106 |
"Register a new minor mode. |
"Register a new minor mode. |
2107 |
|
|
2126 |
If TOGGLE has a non-nil `:included' property, an entry for the mode is |
If TOGGLE has a non-nil `:included' property, an entry for the mode is |
2127 |
included in the mode-line minor mode menu. |
included in the mode-line minor mode menu. |
2128 |
If TOGGLE has a `:menu-tag', that is used for the menu item's label." |
If TOGGLE has a `:menu-tag', that is used for the menu item's label." |
2129 |
|
(unless (memq toggle minor-mode-list) |
2130 |
|
(push toggle minor-mode-list)) |
2131 |
|
|
2132 |
(unless toggle-fun (setq toggle-fun toggle)) |
(unless toggle-fun (setq toggle-fun toggle)) |
2133 |
;; Add the name to the minor-mode-alist. |
;; Add the name to the minor-mode-alist. |
2134 |
(when name |
(when name |