changeset 59090:ce01a490300d

(calc-read-var-name): Remove initial "var-" from minibuffer.
author Jay Belanger <jay.p.belanger@gmail.com>
date Mon, 27 Dec 2004 05:02:08 +0000
parents 22da0004ae3c
children 0e949a8f0be2
files lisp/calc/calc-store.el
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-store.el	Sun Dec 26 23:33:51 2004 +0000
+++ b/lisp/calc/calc-store.el	Mon Dec 27 05:02:08 2004 +0000
@@ -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")