Function: pc-select-save-and-set-mode
pc-select-save-and-set-mode is a macro defined in pc-select.el.gz.
Signature
(pc-select-save-and-set-mode MODE &optional ARG MODE-VAR)
Documentation
Call the function MODE; save the old value of the variable MODE.
MODE is presumed to be a function which turns on a minor mode. First,
save the value of the variable MODE on pc-select-saved-settings-alist.
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.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/pc-select.el.gz
(defmacro pc-select-save-and-set-mode (mode &optional arg mode-var)
"Call the function MODE; save the old value of the variable MODE.
MODE is presumed to be a function which turns on a minor mode. First,
save the value of the variable MODE on `pc-select-saved-settings-alist'.
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'."
(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)))