changeset 62819:3e8d22427034

(calc-kbd-report): Remove. (calc-kbd-query): Rewrite.
author Jay Belanger <jay.p.belanger@gmail.com>
date Fri, 27 May 2005 14:25:16 +0000
parents afd605311713
children 4d1d10306a3b
files lisp/calc/calc-prog.el
diffstat 1 files changed, 15 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-prog.el	Fri May 27 14:18:59 2005 +0000
+++ b/lisp/calc/calc-prog.el	Fri May 27 14:25:16 2005 +0000
@@ -1446,15 +1446,22 @@
     (error "Unbalanced Z' in keyboard macro")))
 
 
-(defun calc-kbd-report (msg)
-  (interactive "sMessage: ")
-  (calc-wrapper
-   (math-working msg (calc-top-n 1))))
+;; (defun calc-kbd-report (msg)
+;;   (interactive "sMessage: ")
+;;   (calc-wrapper
+;;    (math-working msg (calc-top-n 1))))
 
-(defun calc-kbd-query (msg)
-  (interactive "sPrompt: ")
-  (calc-wrapper
-   (calc-alg-entry nil (and (not (equal msg "")) msg))))
+(defun calc-kbd-query ()
+  (interactive)
+  (let ((defining-kbd-macro nil)
+        (executing-kbd-macro nil)
+        (msg (calc-top 1)))
+    (if (not (eq (car-safe msg) 'vec))
+        (error "No prompt string provided on stack")
+      (setq msg (math-vector-to-string msg))
+      (calc-wrapper
+       (calc-pop-stack 1)
+       (calc-alg-entry nil (and (not (equal msg "")) msg))))))
 
 ;;;; Logical operations.