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
024ab5b5
Commit
024ab5b5
authored
Feb 01, 2002
by
Richard M. Stallman
Browse files
(pc-select-save-and-set-mode): Properly use MODE-VAR.
parent
f95c4fe5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
lisp/emulation/pc-select.el
lisp/emulation/pc-select.el
+8
-9
No files found.
lisp/emulation/pc-select.el
View file @
024ab5b5
...
...
@@ -785,8 +785,8 @@ cdr of that cell with VAL. Otherwise, make a new cons cell
"Set VAR to NEWVAL; save the old value.
The old value is saved on the `pc-select-saved-settings-alist'."
`
(
when
(
boundp
',var
)
(
pc-select-add-to-alist
pc-select-saved-settings-alist
,
var
,
var
)
(
setq
,
var
,
newval
)))
(
pc-select-add-to-alist
pc-select-saved-settings-alist
,
var
,
var
)
(
setq
,
var
,
newval
)))
(
defmacro
pc-select-save-and-set-mode
(
mode
&optional
arg
mode-var
)
"Call the function MODE; save the old value of the variable MODE.
...
...
@@ -796,12 +796,11 @@ Then, if ARG is specified, call MODE with ARG, otherwise call it with
nil as an argument. If MODE-VAR is specified, save the value of the
variable MODE-VAR (instead of the value of the variable MODE) on
`pc-select-saved-settings-alist'."
`
(
when
(
fboundp
',mode
)
(
pc-select-add-to-alist
pc-select-saved-settings-alist
,
mode
(
or
(
and
(
boundp
',mode
)
,
mode
)
,
mode-var
))
(
,
mode
,
arg
)))
(
unless
mode-var
(
setq
mode-var
mode
))
`
(
when
(
fboundp
',mode
)
(
pc-select-add-to-alist
pc-select-saved-settings-alist
,
mode-var
,
mode-var
)
(
,
mode
,
arg
)))
(
defmacro
pc-select-restore-var
(
var
)
"Restore the previous value of the variable VAR.
...
...
@@ -821,7 +820,7 @@ If the value is non-nil, call the function MODE with an argument of
`
(
when
(
fboundp
',mode
)
(
let
((
,
elt
(
assq
',mode
pc-select-saved-settings-alist
)))
(
unless
(
null
,
elt
)
(
,
mode
(
if
(
cdr
,
elt
)
1
-1
)))))))
(
,
mode
(
if
(
cdr
,
elt
)
1
-1
)))))))
;;;###autoload
...
...
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