/[emacs]/emacs/lispref/commands.texi
ViewVC logotype

Diff of /emacs/lispref/commands.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36.2.2 by miles, Tue Oct 14 23:10:11 2003 UTC revision 1.36.2.3 by miles, Fri Nov 21 00:35:46 2003 UTC
# Line 340  You can use @samp{e} more than once in a Line 340  You can use @samp{e} more than once in a
340  specification.  If the key sequence that invoked the command has  specification.  If the key sequence that invoked the command has
341  @var{n} events that are lists, the @var{n}th @samp{e} provides the  @var{n} events that are lists, the @var{n}th @samp{e} provides the
342  @var{n}th such event.  Events that are not lists, such as function keys  @var{n}th such event.  Events that are not lists, such as function keys
343  and @sc{ascii} characters, do not count where @samp{e} is concerned.  and @acronym{ASCII} characters, do not count where @samp{e} is concerned.
344    
345  @item f  @item f
346  A file name of an existing file (@pxref{File Names}).  The default  A file name of an existing file (@pxref{File Names}).  The default
# Line 797  last-command-event Line 797  last-command-event
797  @end example  @end example
798    
799  @noindent  @noindent
800  The value is 5 because that is the @sc{ascii} code for @kbd{C-e}.  The value is 5 because that is the @acronym{ASCII} code for @kbd{C-e}.
801    
802  The alias @code{last-command-char} exists for compatibility with  The alias @code{last-command-char} exists for compatibility with
803  Emacs version 18.  Emacs version 18.
# Line 916  The Line 916  The
916  @ifnottex  @ifnottex
917  2**26  2**26
918  @end ifnottex  @end ifnottex
919  bit in the character code indicates a non-@sc{ascii}  bit in the character code indicates a non-@acronym{ASCII}
920  control character.  control character.
921    
922  @sc{ascii} control characters such as @kbd{C-a} have special basic  @sc{ascii} control characters such as @kbd{C-a} have special basic
923  codes of their own, so Emacs needs no special bit to indicate them.  codes of their own, so Emacs needs no special bit to indicate them.
924  Thus, the code for @kbd{C-a} is just 1.  Thus, the code for @kbd{C-a} is just 1.
925    
926  But if you type a control combination not in @sc{ascii}, such as  But if you type a control combination not in @acronym{ASCII}, such as
927  @kbd{%} with the control key, the numeric value you get is the code  @kbd{%} with the control key, the numeric value you get is the code
928  for @kbd{%} plus  for @kbd{%} plus
929  @tex  @tex
# Line 932  for @kbd{%} plus Line 932  for @kbd{%} plus
932  @ifnottex  @ifnottex
933  2**26  2**26
934  @end ifnottex  @end ifnottex
935  (assuming the terminal supports non-@sc{ascii}  (assuming the terminal supports non-@acronym{ASCII}
936  control characters).  control characters).
937    
938  @item shift  @item shift
# Line 943  The Line 943  The
943  @ifnottex  @ifnottex
944  2**25  2**25
945  @end ifnottex  @end ifnottex
946  bit in the character code indicates an @sc{ascii} control  bit in the character code indicates an @acronym{ASCII} control
947  character typed with the shift key held down.  character typed with the shift key held down.
948    
949  For letters, the basic code itself indicates upper versus lower case;  For letters, the basic code itself indicates upper versus lower case;
950  for digits and punctuation, the shift key selects an entirely different  for digits and punctuation, the shift key selects an entirely different
951  character with a different basic code.  In order to keep within the  character with a different basic code.  In order to keep within the
952  @sc{ascii} character set whenever possible, Emacs avoids using the  @acronym{ASCII} character set whenever possible, Emacs avoids using the
953  @tex  @tex
954  @math{2^{25}}  @math{2^{25}}
955  @end tex  @end tex
# Line 958  character with a different basic code. Line 958  character with a different basic code.
958  @end ifnottex  @end ifnottex
959  bit for those characters.  bit for those characters.
960    
961  However, @sc{ascii} provides no way to distinguish @kbd{C-A} from  However, @acronym{ASCII} provides no way to distinguish @kbd{C-A} from
962  @kbd{C-a}, so Emacs uses the  @kbd{C-a}, so Emacs uses the
963  @tex  @tex
964  @math{2^{25}}  @math{2^{25}}
# Line 1032  function keys: Line 1032  function keys:
1032    
1033  @table @asis  @table @asis
1034  @item @code{backspace}, @code{tab}, @code{newline}, @code{return}, @code{delete}  @item @code{backspace}, @code{tab}, @code{newline}, @code{return}, @code{delete}
1035  These keys correspond to common @sc{ascii} control characters that have  These keys correspond to common @acronym{ASCII} control characters that have
1036  special keys on most keyboards.  special keys on most keyboards.
1037    
1038  In @sc{ascii}, @kbd{C-i} and @key{TAB} are the same character.  If the  In @acronym{ASCII}, @kbd{C-i} and @key{TAB} are the same character.  If the
1039  terminal can distinguish between them, Emacs conveys the distinction to  terminal can distinguish between them, Emacs conveys the distinction to
1040  Lisp programs by representing the former as the integer 9, and the  Lisp programs by representing the former as the integer 9, and the
1041  latter as the symbol @code{tab}.  latter as the symbol @code{tab}.
# Line 1047  character @kbd{C-i}) also applies to @co Line 1047  character @kbd{C-i}) also applies to @co
1047  symbols in this group.  The function @code{read-char} likewise converts  symbols in this group.  The function @code{read-char} likewise converts
1048  these events into characters.  these events into characters.
1049    
1050  In @sc{ascii}, @key{BS} is really @kbd{C-h}.  But @code{backspace}  In @acronym{ASCII}, @key{BS} is really @kbd{C-h}.  But @code{backspace}
1051  converts into the character code 127 (@key{DEL}), not into code 8  converts into the character code 127 (@key{DEL}), not into code 8
1052  (@key{BS}).  This is what most users prefer.  (@key{BS}).  This is what most users prefer.
1053    
# Line 1096  arguments to the key-binding lookup and Line 1096  arguments to the key-binding lookup and
1096    
1097  Emacs supports four kinds of mouse events: click events, drag events,  Emacs supports four kinds of mouse events: click events, drag events,
1098  button-down events, and motion events.  All mouse events are represented  button-down events, and motion events.  All mouse events are represented
1099  as lists.  The @sc{car} of the list is the event type; this says which  as lists.  The @acronym{CAR} of the list is the event type; this says which
1100  mouse button was involved, and which modifier keys were used with it.  mouse button was involved, and which modifier keys were used with it.
1101  The event type can also distinguish double or triple button presses  The event type can also distinguish double or triple button presses
1102  (@pxref{Repeat Events}).  The rest of the list elements give position  (@pxref{Repeat Events}).  The rest of the list elements give position
# Line 1521  into another window.  That produces a pa Line 1521  into another window.  That produces a pa
1521  key binding purposes.  For a keyboard event, the event type equals the  key binding purposes.  For a keyboard event, the event type equals the
1522  event value; thus, the event type for a character is the character, and  event value; thus, the event type for a character is the character, and
1523  the event type for a function key symbol is the symbol itself.  For  the event type for a function key symbol is the symbol itself.  For
1524  events that are lists, the event type is the symbol in the @sc{car} of  events that are lists, the event type is the symbol in the @acronym{CAR} of
1525  the list.  Thus, the event type is always a symbol or a character.  the list.  Thus, the event type is always a symbol or a character.
1526    
1527    Two events of the same type are equivalent where key bindings are    Two events of the same type are equivalent where key bindings are
# Line 1810  bit, resulting in a value between 128 an Line 1810  bit, resulting in a value between 128 an
1810  can include these codes.  can include these codes.
1811    
1812  @item  @item
1813  Non-@sc{ascii} characters above 256 can be included in a multibyte string.  Non-@acronym{ASCII} characters above 256 can be included in a multibyte string.
1814    
1815  @item  @item
1816  Other keyboard character events cannot fit in a string.  This includes  Other keyboard character events cannot fit in a string.  This includes
# Line 1979  Echo Area}. Line 1979  Echo Area}.
1979    
1980  If @var{inherit-input-method} is non-@code{nil}, then the current input  If @var{inherit-input-method} is non-@code{nil}, then the current input
1981  method (if any) is employed to make it possible to enter a  method (if any) is employed to make it possible to enter a
1982  non-@sc{ascii} character.  Otherwise, input method handling is disabled  non-@acronym{ASCII} character.  Otherwise, input method handling is disabled
1983  for reading this event.  for reading this event.
1984    
1985  If @code{cursor-in-echo-area} is non-@code{nil}, then @code{read-event}  If @code{cursor-in-echo-area} is non-@code{nil}, then @code{read-event}
# Line 2009  user generates an event which is not a c Line 2009  user generates an event which is not a c
2009  function key event), @code{read-char} signals an error.  The arguments  function key event), @code{read-char} signals an error.  The arguments
2010  work as in @code{read-event}.  work as in @code{read-event}.
2011    
2012  In the first example, the user types the character @kbd{1} (@sc{ascii}  In the first example, the user types the character @kbd{1} (@acronym{ASCII}
2013  code 49).  The second example shows a keyboard macro definition that  code 49).  The second example shows a keyboard macro definition that
2014  calls @code{read-char} from the minibuffer using @code{eval-expression}.  calls @code{read-char} from the minibuffer using @code{eval-expression}.
2015  @code{read-char} reads the keyboard macro's very next character, which  @code{read-char} reads the keyboard macro's very next character, which
# Line 2189  This variable records the last terminal Line 2189  This variable records the last terminal
2189  as part of a command or explicitly by a Lisp program.  as part of a command or explicitly by a Lisp program.
2190    
2191  In the example below, the Lisp program reads the character @kbd{1},  In the example below, the Lisp program reads the character @kbd{1},
2192  @sc{ascii} code 49.  It becomes the value of @code{last-input-event},  @acronym{ASCII} code 49.  It becomes the value of @code{last-input-event},
2193  while @kbd{C-e} (we assume @kbd{C-x C-e} command is used to evaluate  while @kbd{C-e} (we assume @kbd{C-x C-e} command is used to evaluate
2194  this expression) remains the value of @code{last-command-event}.  this expression) remains the value of @code{last-command-event}.
2195    
# Line 2513  This function returns the numeric meanin Line 2513  This function returns the numeric meanin
2513  value, @var{arg}.  The argument may be a symbol, a number, or a list.  value, @var{arg}.  The argument may be a symbol, a number, or a list.
2514  If it is @code{nil}, the value 1 is returned; if it is @code{-}, the  If it is @code{nil}, the value 1 is returned; if it is @code{-}, the
2515  value @minus{}1 is returned; if it is a number, that number is returned;  value @minus{}1 is returned; if it is a number, that number is returned;
2516  if it is a list, the @sc{car} of that list (which should be a number) is  if it is a list, the @acronym{CAR} of that list (which should be a number) is
2517  returned.  returned.
2518  @end defun  @end defun
2519    

Legend:
Removed from v.1.36.2.2  
changed lines
  Added in v.1.36.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26