Commit 8cdb7a17 authored by Jay Belanger's avatar Jay Belanger
Browse files

(calc-read-var-name): Remove initial "var-" from minibuffer.

parent aa0a8561
......@@ -174,13 +174,17 @@
(defun calc-read-var-name (prompt &optional calc-store-opers)
(setq calc-given-value nil
calc-aborted-prefix nil)
(let ((var (let ((minibuffer-completion-table obarray)
(minibuffer-completion-predicate 'boundp)
(minibuffer-completion-confirm t))
(read-from-minibuffer prompt "var-" calc-var-name-map nil))))
(let ((var (concat
(let ((minibuffer-completion-table
(mapcar (lambda (x) (substring x 4))
(all-completions "var-" obarray)))
(lambda (x) (boundp (intern (concat "var-" x)))))
(minibuffer-completion-confirm t))
(read-from-minibuffer prompt nil calc-var-name-map nil)))))
(setq calc-aborted-prefix "")
(and (not (equal var ""))
(not (equal var "var-"))
(and (not (equal var "var-"))
(if (string-match "\\`\\([-a-zA-Z0-9]+\\) *:?=" var)
(if (null calc-given-value-flag)
(error "Assignment is not allowed in this command")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment