Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b35bd33d
Commit
b35bd33d
authored
Apr 26, 2000
by
Gerd Moellmann
Browse files
(add-minor-mode): Make argument MAP optional.
parent
24d744ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/subr.el
lisp/subr.el
+3
-3
No files found.
lisp/ChangeLog
View file @
b35bd33d
2000-04-26 Gerd Moellmann <gerd@gnu.org>
2000-04-26 Gerd Moellmann <gerd@gnu.org>
* subr.el (add-minor-mode): Make argument MAP optional.
* desktop.el (desktop-save): Save list of minor modes.
* desktop.el (desktop-save): Save list of minor modes.
(desktop-create-buffer): Restore minor modes.
(desktop-create-buffer): Restore minor modes.
(desktop-minor-mode-table): New user-option.
(desktop-minor-mode-table): New user-option.
...
...
lisp/subr.el
View file @
b35bd33d
...
@@ -1486,17 +1486,17 @@ If DIR-FLAG is non-nil, create a new empty directory instead of a file."
...
@@ -1486,17 +1486,17 @@ If DIR-FLAG is non-nil, create a new empty directory instead of a file."
file
))
file
))
(
defun
add-minor-mode
(
symbol
name
map
)
(
defun
add-minor-mode
(
symbol
name
&optional
map
)
"Register a new minor mode.
"Register a new minor mode.
SYMBOL is the name of a buffer-local variable that is toggled on
SYMBOL is the name of a buffer-local variable that is toggled on
or off to say whether the minor mode is active or not. NAME is the
or off to say whether the minor mode is active or not. NAME is the
string that will appear in the mode line when the minor mode is
string that will appear in the mode line when the minor mode is
active. MAP is the keymap for the minor mode."
active.
Optional
MAP is the keymap for the minor mode."
(
make-local-variable
symbol
)
(
make-local-variable
symbol
)
(
setq
symbol
t
)
(
setq
symbol
t
)
(
unless
(
assq
symbol
minor-mode-alist
)
(
unless
(
assq
symbol
minor-mode-alist
)
(
add-to-list
'minor-mode-alist
(
list
symbol
name
)))
(
add-to-list
'minor-mode-alist
(
list
symbol
name
)))
(
unless
(
assq
symbol
minor-mode-map-alist
)
(
when
(
and
map
(
not
(
assq
symbol
minor-mode-map-alist
)
))
(
add-to-list
'minor-mode-map-alist
(
cons
symbol
map
))))
(
add-to-list
'minor-mode-map-alist
(
cons
symbol
map
))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment