emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lispref/commands.texi


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lispref/commands.texi
Date: Sun, 19 Feb 2006 23:38:11 +0000

Index: emacs/lispref/commands.texi
diff -u emacs/lispref/commands.texi:1.77 emacs/lispref/commands.texi:1.78
--- emacs/lispref/commands.texi:1.77    Sun Feb 19 23:37:38 2006
+++ emacs/lispref/commands.texi Sun Feb 19 23:38:11 2006
@@ -150,40 +150,6 @@
 arguments.  This leads quickly to an error if the command requires one
 or more arguments.
 
-
address@hidden
-It may be a Lisp expression that is not a string; then it should be a
-form that is evaluated to get a list of arguments to pass to the
-command.  Usually this form will call various functions to read input
-from the user, most often through the minibuffer (@pxref{Minibuffer})
-or directly from the keyboard (@pxref{Reading Input}).
address@hidden argument evaluation form
-
-Providing point or the mark as an argument value is also common, but
-if you do this @emph{and} read input (whether using the minibuffer or
-not), be sure to get the integer values of point or the mark after
-reading.  The current buffer may be receiving subprocess output; if
-subprocess output arrives while the command is waiting for input, it
-could relocate point and the mark.
-
-Here's an example of what @emph{not} to do:
-
address@hidden
-(interactive
- (list (region-beginning) (region-end)
-       (read-string "Foo: " nil 'my-history)))
address@hidden smallexample
-
address@hidden
-Here's how to avoid the problem, by examining point and the mark after
-reading the keyboard input:
-
address@hidden
-(interactive
- (let ((string (read-string "Foo: " nil 'my-history)))
-   (list (region-beginning) (region-end) string)))
address@hidden smallexample
-
 @item
 @cindex argument prompt
 It may be a string; then its contents should consist of a code character
@@ -234,6 +200,39 @@
 Actual reading of arguments is controlled by the rest of the prompt
 string (starting with the first character that is not @samp{*} or
 @samp{@@}).
+
address@hidden
+It may be a Lisp expression that is not a string; then it should be a
+form that is evaluated to get a list of arguments to pass to the
+command.  Usually this form will call various functions to read input
+from the user, most often through the minibuffer (@pxref{Minibuffer})
+or directly from the keyboard (@pxref{Reading Input}).
address@hidden argument evaluation form
+
+Providing point or the mark as an argument value is also common, but
+if you do this @emph{and} read input (whether using the minibuffer or
+not), be sure to get the integer values of point or the mark after
+reading.  The current buffer may be receiving subprocess output; if
+subprocess output arrives while the command is waiting for input, it
+could relocate point and the mark.
+
+Here's an example of what @emph{not} to do:
+
address@hidden
+(interactive
+ (list (region-beginning) (region-end)
+       (read-string "Foo: " nil 'my-history)))
address@hidden smallexample
+
address@hidden
+Here's how to avoid the problem, by examining point and the mark after
+reading the keyboard input:
+
address@hidden
+(interactive
+ (let ((string (read-string "Foo: " nil 'my-history)))
+   (list (region-beginning) (region-end) string)))
address@hidden smallexample
 @end itemize
 
 @cindex examining the @code{interactive} form




reply via email to

[Prev in Thread] Current Thread [Next in Thread]