]> git.eshelyaron.com Git - emacs.git/commitdiff
(calc-kbd-report): Remove.
authorJay Belanger <jay.p.belanger@gmail.com>
Fri, 27 May 2005 14:25:16 +0000 (14:25 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Fri, 27 May 2005 14:25:16 +0000 (14:25 +0000)
(calc-kbd-query): Rewrite.

lisp/calc/calc-prog.el

index 0a24fbf574cd03d2b703eb998edd14555ba98f34..7bfb47ee61be4e1808ab80129b38f30881b45a8c 100644 (file)
@@ -1446,15 +1446,22 @@ Redefine the corresponding command."
     (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.