Function: calc-permanent-variable

calc-permanent-variable is an autoloaded, interactive and byte-compiled function defined in calc-store.el.gz.

Signature

(calc-permanent-variable &optional VAR)

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-store.el.gz
(defun calc-permanent-variable (&optional var)
  (interactive)
  (calc-wrapper
   (or var (setq var (calc-read-var-name "Save variable (default all): ")))
   (let (calc-pv-pos)
     (and var (or (and (boundp var) (symbol-value var))
		  (error "No such variable")))
     (set-buffer (find-file-noselect (substitute-in-file-name
				      calc-settings-file)))
     (if var
	 (calc-insert-permanent-variable var)
       (mapatoms (lambda (x)
                   (and (string-match "\\`var-" (symbol-name x))
                        (not (memq x calc-dont-insert-variables))
                        (calc-var-value x)
                        (not (eq (car-safe (symbol-value x)) 'special-const))
                        (calc-insert-permanent-variable x)))))
     (save-buffer))))