diff lispref/commands.texi @ 26696:ef5e7bbe6f19

Current version from /gd/gnu/elisp.
author Dave Love <fx@gnu.org>
date Fri, 03 Dec 1999 19:11:12 +0000
parents 6119687f6888
children f6b52258db6a
line wrap: on
line diff
--- a/lispref/commands.texi	Fri Dec 03 19:08:52 1999 +0000
+++ b/lispref/commands.texi	Fri Dec 03 19:11:12 1999 +0000
@@ -18,6 +18,7 @@
 * Defining Commands::   Specifying how a function should read arguments.
 * Interactive Call::    Calling a command, so that it will read arguments.
 * Command Loop Info::   Variables set by the command loop for you to examine.
+* Adjusting Point::     Adjustment of point after a command.
 * Input Events::	What input looks like when you read it.
 * Reading Input::       How to read input events from the keyboard or mouse.
 * Special Events::      Events processed immediately and individually.
@@ -726,9 +727,9 @@
 @end defun
 
 @defun this-command-keys-vector
-Like @code{this-command-keys}, except that it always returns
-the events in a vector, so you do never need to deal with the complexities
-of storing input events in a string (@pxref{Strings of Events}).
+Like @code{this-command-keys}, except that it always returns the events
+in a vector, so you don't need to deal with the complexities of storing
+input events in a string (@pxref{Strings of Events}).
 @end defun
 
 @tindex clear-this-command-keys
@@ -779,6 +780,35 @@
 @xref{Input Focus}.
 @end defvar
 
+@node Adjusting Point
+@section Adjusting Point After Commands
+
+  It is not easy to display a value of point in the middle of a sequence
+of text that has the @code{display} or @code{composition} property.  So
+after a command finishes and returns to the command loop, if point is
+within such a sequence, the command loop normally moves point to the
+edge of the sequence.
+
+  A command can inhibit this feature by setting the variable
+@code{disable-point-adjustment}:
+
+@defvar disable-point-adjustment
+@tindex disable-point-adjustment
+If this variable is non-@code{nil} when a command returns to the command
+loop, then the command loop does not check for text properties such as
+@code{display} and @code{composition}, and does not move point out of
+sequences that have these properties.
+
+The command loop sets this variable to @code{nil} before each command,
+so if a command sets it, the effect applies only to that command.
+@end defvar
+
+@defvar global-disable-point-adjustment
+@tindex global-disable-point-adjustment
+If you set this variable to a non-@code{nil} value, the feature of
+moving point out of these sequences is completely turned off.
+@end defvar
+
 @node Input Events
 @section Input Events
 @cindex events
@@ -1192,6 +1222,7 @@
 @cindex repeat events
 @cindex double-click events
 @cindex triple-click events
+@cindex mouse events, repeated
 
 If you press the same mouse button more than once in quick succession
 without moving the mouse, Emacs generates special @dfn{repeat} mouse
@@ -1529,6 +1560,8 @@
 
 @node Accessing Events
 @subsection Accessing Events
+@cindex mouse events, accessing the data
+@cindex accessing data of mouse events
 
   This section describes convenient functions for accessing the data in
 a mouse button or motion event.
@@ -1557,6 +1590,7 @@
 position such events have.
 @end defun
 
+@cindex mouse position list, accessing
   These five functions take a position list as described above, and
 return various parts of it.
 
@@ -1579,6 +1613,8 @@
 @var{x} and @var{y} values actually found in @var{position}.
 @end defun
 
+@cindex mouse event, timestamp
+@cindex timestamp of a mouse event
 @defun posn-timestamp position
 Return the timestamp in @var{position}.
 @end defun
@@ -1614,6 +1650,8 @@
 
 @node Strings of Events
 @subsection Putting Keyboard Events in Strings
+@cindex keyboard events in strings
+@cindex strings with keyboard events
 
   In most of the places where strings are used, we conceptualize the
 string as containing text characters---the same kind of characters found
@@ -1818,17 +1856,24 @@
 miscellaneous window events so that they never appear in a key sequence
 with any other events.
 
+@cindex @code{header-line} prefix key
+@cindex @code{mode-line} prefix key
+@cindex @code{vertical-line} prefix key
+@cindex @code{horizontal-scroll-bar} prefix key
+@cindex @code{vertical-scroll-bar} prefix key
+@cindex @code{menu-bar} prefix key
+@cindex mouse events, in special parts of frame
 When mouse events occur in special parts of a window, such as a mode
 line or a scroll bar, the event type shows nothing special---it is the
 same symbol that would normally represent that combination of mouse
 button and modifier keys.  The information about the window part is kept
 elsewhere in the event---in the coordinates.  But
 @code{read-key-sequence} translates this information into imaginary
-``prefix keys'', all of which are symbols: @code{mode-line},
-@code{vertical-line}, @code{horizontal-scroll-bar} and
-@code{vertical-scroll-bar}.  You can define meanings for mouse clicks in
-special window parts by defining key sequences using these imaginary
-prefix keys.
+``prefix keys'', all of which are symbols: @code{heder-line},
+@code{horizontal-scroll-bar}, @code{menu-bar}, @code{mode-line},
+@code{vertical-line}, and @code{vertical-scroll-bar}.  You can define
+meanings for mouse clicks in special window parts by defining key
+sequences using these imaginary prefix keys.
 
 For example, if you call @code{read-key-sequence} and then click the
 mouse on the window's mode line, you get two events, like this:
@@ -1856,6 +1901,8 @@
 
 @node Reading One Event
 @subsection Reading One Event
+@cindex reading a single event
+@cindex event, reading only one
 
   The lowest level functions for command input are those that read a
 single event.
@@ -1960,7 +2007,8 @@
   The input method function should return a list of events which should
 be used as input.  (If the list is @code{nil}, that means there is no
 input, so @code{read-event} waits for another event.)  These events are
-processed before the events in @code{unread-command-events}.  Events
+processed before the events in @code{unread-command-events}
+(@pxref{Event Input Misc}).  Events
 returned by the input method function are not passed to the input method
 function again, even if they are printing characters with no modifier
 bits.