From: Jay Belanger Date: Mon, 27 Dec 2004 05:02:08 +0000 (+0000) Subject: (calc-read-var-name): Remove initial "var-" from minibuffer. X-Git-Tag: ttn-vms-21-2-B4~3158 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8cdb7a173da588c23453e9af386ed3c53b00ef7d;p=emacs.git (calc-read-var-name): Remove initial "var-" from minibuffer. --- diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index 2dca53b46bb..a3c401e734e 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -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 + "var-" + (let ((minibuffer-completion-table + (mapcar (lambda (x) (substring x 4)) + (all-completions "var-" obarray))) + (minibuffer-completion-predicate + (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")