]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/commands.texi
Improve documentation of `special' modes.
[gnu-emacs] / doc / lispref / commands.texi
index 25fd50b1591ded5ef7c16f5bb95074d5e62589ca..e76b2bafd79ebe1a14eb1a7246a31900eb3646f0 100644 (file)
@@ -91,8 +91,9 @@ and also when the command loop is first entered.  At that time,
 
   Quitting is suppressed while running @code{pre-command-hook} and
 @code{post-command-hook}.  If an error happens while executing one of
-these hooks, it terminates execution of the hook, and clears the hook
-variable to @code{nil} so as to prevent an infinite loop of errors.
+these hooks, it does not terminate execution of the hook; instead
+the error is silenced and the function in which the error occurred
+is removed from the hook.
 
   A request coming into the Emacs server (@pxref{Emacs Server,,,
 emacs, The GNU Emacs Manual}) runs these two hooks just as a keyboard
@@ -596,13 +597,32 @@ realistic example of using @code{commandp}.
 
 @defun call-interactively command &optional record-flag keys
 This function calls the interactively callable function @var{command},
-reading arguments according to its interactive calling specifications.
-It returns whatever @var{command} returns.  An error is signaled if
-@var{command} is not a function or if it cannot be called
-interactively (i.e., is not a command).  Note that keyboard macros
-(strings and vectors) are not accepted, even though they are
-considered commands, because they are not functions.  If @var{command}
-is a symbol, then @code{call-interactively} uses its function definition.
+providing arguments according to its interactive calling specifications.
+It returns whatever @var{command} returns.
+
+If, for instance, you have a function with the following signature:
+
+@example
+(defun foo (begin end)
+  (interactive "r")
+  ...)
+@end example
+
+then saying
+
+@example
+(call-interactively 'foo)
+@end example
+
+will call @code{foo} with the region (@code{point} and @code{mark}) as
+the arguments.
+
+An error is signaled if @var{command} is not a function or if it
+cannot be called interactively (i.e., is not a command).  Note that
+keyboard macros (strings and vectors) are not accepted, even though
+they are considered commands, because they are not functions.  If
+@var{command} is a symbol, then @code{call-interactively} uses its
+function definition.
 
 @cindex record command history
 If @var{record-flag} is non-@code{nil}, then this command and its
@@ -1927,10 +1947,17 @@ into frame-relative coordinates:
 @end defun
 
 @defun posn-col-row position
-Return the row and column (in units of the frame's default character
-height and width) of @var{position}, as a cons cell @code{(@var{col} .
-@var{row})}.  These are computed from the @var{x} and @var{y} values
-actually found in @var{position}.
+This function returns a cons cell @code{(@var{col} .  @var{row})},
+containing the estimated column and row corresponding to buffer
+position @var{position}.  The return value is given in units of the
+frame's default character width and height, as computed from the
+@var{x} and @var{y} values corresponding to @var{position}.  (So, if
+the actual characters have non-default sizes, the actual row and
+column may differ from these computed values.)
+
+Note that @var{row} is counted from the top of the text area.  If the
+window possesses a header line (@pxref{Header Lines}), it is
+@emph{not} counted as the first line.
 @end defun
 
 @defun posn-actual-col-row position
@@ -2985,7 +3012,7 @@ An integer, which stands for itself.
 
 @item
 A list of one element, which is an integer.  This form of prefix
-argument results from one or a succession of @kbd{C-u}'s with no
+argument results from one or a succession of @kbd{C-u}s with no
 digits.  The numeric value is the integer in the list, but some
 commands make a distinction between such a list and an integer alone.