1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-31 11:13:50 +00:00

(Queries in Keyboard Macros): Rewrite to reflect current behavior.

This commit is contained in:
Jay Belanger 2005-05-27 14:18:59 +00:00
parent d5e1a786b7
commit faa3b6fc5d

View File

@ -31395,23 +31395,35 @@ are @emph{not} affected by @kbd{Z `} and @kbd{Z '}.
@node Queries in Macros, , Local Values in Macros, Keyboard Macros
@subsection Queries in Keyboard Macros
@noindent
@kindex Z =
@pindex calc-kbd-report
The @kbd{Z =} (@code{calc-kbd-report}) command displays an informative
message including the value on the top of the stack. You are prompted
to enter a string. That string, along with the top-of-stack value,
is displayed unless @kbd{m w} (@code{calc-working}) has been used
to turn such messages off.
@c @noindent
@c @kindex Z =
@c @pindex calc-kbd-report
@c The @kbd{Z =} (@code{calc-kbd-report}) command displays an informative
@c message including the value on the top of the stack. You are prompted
@c to enter a string. That string, along with the top-of-stack value,
@c is displayed unless @kbd{m w} (@code{calc-working}) has been used
@c to turn such messages off.
@noindent
@kindex Z #
@pindex calc-kbd-query
The @kbd{Z #} (@code{calc-kbd-query}) command displays a prompt message
(which you enter during macro definition), then does an algebraic entry
which takes its input from the keyboard, even during macro execution.
This command allows your keyboard macros to accept numbers or formulas
as interactive input. All the normal conventions of algebraic input,
including the use of @kbd{$} characters, are supported.
The @kbd{Z #} (@code{calc-kbd-query}) command prompts for an algebraic
entry which takes its input from the keyboard, even during macro
execution. All the normal conventions of algebraic input, including the
use of @kbd{$} characters, are supported. The prompt message itself is
taken from the top of the stack, and so must be entered (as a string)
before the @kbd{Z #} command. (Recall, as a string it can be entered by
pressing the @kbd{"} key and will appear as a vector when it is put on
the stack. The prompt message is only put on the stack to provide a
prompt for the @kbd{Z #} command; it will not play any role in any
subsequent calculations.) This command allows your keyboard macros to
accept numbers or formulas as interactive input.
As an example,
@kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET}} will prompt for
input with ``Power: '' in the minibuffer, then return 2 to the provided
power. (The response to the prompt that's given, 3 in this example,
will not be part of the macro.)
@xref{Keyboard Macro Query, , , emacs, the Emacs Manual}, for a description of
@kbd{C-x q} (@code{kbd-macro-query}), the standard Emacs way to accept
@ -35869,8 +35881,7 @@ keystrokes are not listed in this summary.
@c
@r{ @: Z ` @: @: @:calc-kbd-push@:}
@r{ @: Z ' @: @: @:calc-kbd-pop@:}
@r{ a@: Z = @:message @: 28 @:calc-kbd-report@:}
@r{ @: Z # @:prompt @: @:calc-kbd-query@:}
@r{ @: Z # @: @: @:calc-kbd-query@:}
@c
@r{ comp@: Z C @:func, args @: 50 @:calc-user-define-composition@:}