Function: calc-copy-special-constant

calc-copy-special-constant is an autoloaded, interactive and byte-compiled function defined in calc-store.el.gz.

Signature

(calc-copy-special-constant &optional SCONST VAR)

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-store.el.gz
(defun calc-copy-special-constant (&optional sconst var)
  (interactive)
  (let ((sc '(("")
              ("e" . (special-const (math-e)))
              ("pi" . (special-const (math-pi)))
              ("i" . (special-const (math-imaginary 1)))
              ("phi" . (special-const (math-phi)))
              ("gamma" . (special-const (math-gamma-const))))))
  (calc-wrapper
   (or sconst (setq sconst (completing-read "Special constant: " sc nil t)))
   (unless (string= sconst "")
     (let ((value (cdr (assoc sconst sc))))
       (or var (setq var (calc-read-var-name
                            (format "Copy special constant %s, to: "
                                    sconst))))
       (if var
           (let ((msg (calc-store-value var value "")))
	     (message "Special constant \"%s\" copied to \"%s\"%s"
		      sconst (calc-var-name var) msg))))))))