From fb9cc23825dca26a71b1af1ec2b1b6cad7276b18 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 27 May 2005 14:25:16 +0000 Subject: [PATCH] (calc-kbd-report): Remove. (calc-kbd-query): Rewrite. --- lisp/calc/calc-prog.el | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 0a24fbf574c..7bfb47ee61b 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -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. -- 2.39.2