Function: shadow-insert-var
shadow-insert-var is a byte-compiled function defined in
shadowfile.el.gz.
Signature
(shadow-insert-var VARIABLE)
Documentation
Build a setq to restore VARIABLE.
Prettily insert a setq command which, when later evaluated,
will restore VARIABLE to its current setting.
VARIABLE must be the name of a variable whose value is a list.
Source Code
;; Defined in /usr/src/emacs/lisp/shadowfile.el.gz
(defun shadow-insert-var (variable)
"Build a `setq' to restore VARIABLE.
Prettily insert a `setq' command which, when later evaluated,
will restore VARIABLE to its current setting.
VARIABLE must be the name of a variable whose value is a list."
(let ((standard-output (current-buffer)))
(insert (format "(setq %s" variable))
(cond ((consp (symbol-value variable))
(insert "\n '(")
(prin1 (car (symbol-value variable)))
(let ((rest (cdr (symbol-value variable))))
(while rest
(insert "\n ")
(prin1 (car rest))
(setq rest (cdr rest)))
(insert "))\n\n")))
(t (insert " ")
(prin1 (symbol-value variable))
(insert ")\n\n")))))