/[emacs]/emacs/src/keyboard.c
ViewVC logotype

Diff of /emacs/src/keyboard.c

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

revision 1.633 by miles, Sun Oct 21 15:23:58 2001 UTC revision 1.634 by pj, Sun Oct 28 18:47:24 2001 UTC
# Line 975  force_auto_save_soon () Line 975  force_auto_save_soon ()
975  }  }
976    
977  DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "",  DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "",
978    "Invoke the editor command loop recursively.\n\         doc: /* Invoke the editor command loop recursively.
979  To get out of the recursive edit, a command can do `(throw 'exit nil)';\n\  To get out of the recursive edit, a command can do `(throw 'exit nil)';
980  that tells this function to return.\n\  that tells this function to return.
981  Alternately, `(throw 'exit t)' makes this function signal an error.\n\  Alternately, `(throw 'exit t)' makes this function signal an error.
982  This function is called by the editor initialization to begin editing.")  This function is called by the editor initialization to begin editing.  */)
983    ()       ()
984  {  {
985    int count = specpdl_ptr - specpdl;    int count = specpdl_ptr - specpdl;
986    Lisp_Object buffer;    Lisp_Object buffer;
# Line 1266  top_level_1 () Line 1266  top_level_1 ()
1266  }  }
1267    
1268  DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "",  DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "",
1269    "Exit all recursive editing levels.")         doc: /* Exit all recursive editing levels.  */)
1270    ()       ()
1271  {  {
1272  #ifdef HAVE_X_WINDOWS  #ifdef HAVE_X_WINDOWS
1273    if (display_hourglass_p)    if (display_hourglass_p)
# Line 1277  DEFUN ("top-level", Ftop_level, Stop_lev Line 1277  DEFUN ("top-level", Ftop_level, Stop_lev
1277  }  }
1278    
1279  DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",  DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",
1280    "Exit from the innermost recursive edit or minibuffer.")         doc: /* Exit from the innermost recursive edit or minibuffer.  */)
1281    ()       ()
1282  {  {
1283    if (command_loop_level > 0 || minibuf_level > 0)    if (command_loop_level > 0 || minibuf_level > 0)
1284      Fthrow (Qexit, Qnil);      Fthrow (Qexit, Qnil);
# Line 1288  DEFUN ("exit-recursive-edit", Fexit_recu Line 1288  DEFUN ("exit-recursive-edit", Fexit_recu
1288  }  }
1289    
1290  DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "",  DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "",
1291    "Abort the command that requested this recursive edit or minibuffer input.")         doc: /* Abort the command that requested this recursive edit or minibuffer input.  */)
1292    ()       ()
1293  {  {
1294    if (command_loop_level > 0 || minibuf_level > 0)    if (command_loop_level > 0 || minibuf_level > 0)
1295      Fthrow (Qexit, Qt);      Fthrow (Qexit, Qt);
# Line 3110  tracking_off (old_value) Line 3110  tracking_off (old_value)
3110  }  }
3111    
3112  DEFUN ("track-mouse", Ftrack_mouse, Strack_mouse, 0, UNEVALLED, 0,  DEFUN ("track-mouse", Ftrack_mouse, Strack_mouse, 0, UNEVALLED, 0,
3113    "Evaluate BODY with mouse movement events enabled.\n\         doc: /* Evaluate BODY with mouse movement events enabled.
3114  Within a `track-mouse' form, mouse motion generates input events that\n\  Within a `track-mouse' form, mouse motion generates input events that
3115  you can read with `read-event'.\n\  you can read with `read-event'.
3116  Normally, mouse motion is ignored.\n\  Normally, mouse motion is ignored.
3117  usage: (track-mouse BODY ...)")  usage: (track-mouse BODY ...)  */)
3118    (args)       (args)
3119       Lisp_Object args;       Lisp_Object args;
3120  {  {
3121    int count = specpdl_ptr - specpdl;    int count = specpdl_ptr - specpdl;
# Line 5864  modify_event_symbol (symbol_num, modifie Line 5864  modify_event_symbol (symbol_num, modifie
5864     event type as a number or a symbol.  */     event type as a number or a symbol.  */
5865    
5866  DEFUN ("event-convert-list", Fevent_convert_list, Sevent_convert_list, 1, 1, 0,  DEFUN ("event-convert-list", Fevent_convert_list, Sevent_convert_list, 1, 1, 0,
5867    "Convert the event description list EVENT-DESC to an event type.\n\         doc: /* Convert the event description list EVENT-DESC to an event type.
5868  EVENT-DESC should contain one base event type (a character or symbol)\n\  EVENT-DESC should contain one base event type (a character or symbol)
5869  and zero or more modifier names (control, meta, hyper, super, shift, alt,\n\  and zero or more modifier names (control, meta, hyper, super, shift, alt,
5870  drag, down, double or triple).  The base must be last.\n\  drag, down, double or triple).  The base must be last.
5871  The return value is an event type (a character or symbol) which\n\  The return value is an event type (a character or symbol) which
5872  has the same base event type and all the specified modifiers.")  has the same base event type and all the specified modifiers.  */)
5873    (event_desc)       (event_desc)
5874       Lisp_Object event_desc;       Lisp_Object event_desc;
5875  {  {
5876    Lisp_Object base;    Lisp_Object base;
# Line 8977  read_key_sequence (keybuf, bufsize, prom Line 8977  read_key_sequence (keybuf, bufsize, prom
8977    return t;    return t;
8978  }  }
8979    
 #if 0 /* This doc string is too long for some compilers.  
          This commented-out definition serves for DOC.  */  
 DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 4, 0,  
   "Read a sequence of keystrokes and return as a string or vector.\n\  
 The sequence is sufficient to specify a non-prefix command in the\n\  
 current local and global maps.\n\  
 \n\  
 First arg PROMPT is a prompt string.  If nil, do not prompt specially.\n\  
 Second (optional) arg CONTINUE-ECHO, if non-nil, means this key echos\n\  
 as a continuation of the previous key.\n\  
 \n\  
 The third (optional) arg DONT-DOWNCASE-LAST, if non-nil, means do not\n\  
 convert the last event to lower case.  (Normally any upper case event\n\  
 is converted to lower case if the original event is undefined and the lower\n\  
 case equivalent is defined.)  A non-nil value is appropriate for reading\n\  
 a key sequence to be defined.\n\  
 \n\  
 A C-g typed while in this function is treated like any other character,\n\  
 and `quit-flag' is not set.\n\  
 \n\  
 If the key sequence starts with a mouse click, then the sequence is read\n\  
 using the keymaps of the buffer of the window clicked in, not the buffer\n\  
 of the selected window as normal.\n\  
 ""\n\  
 `read-key-sequence' drops unbound button-down events, since you normally\n\  
 only care about the click or drag events which follow them.  If a drag\n\  
 or multi-click event is unbound, but the corresponding click event would\n\  
 be bound, `read-key-sequence' turns the event into a click event at the\n\  
 drag's starting position.  This means that you don't have to distinguish\n\  
 between click and drag, double, or triple events unless you want to.\n\  
 \n\  
 `read-key-sequence' prefixes mouse events on mode lines, the vertical\n\  
 lines separating windows, and scroll bars with imaginary keys\n\  
 `mode-line', `vertical-line', and `vertical-scroll-bar'.\n\  
 \n\  
 Optional fourth argument CAN-RETURN-SWITCH-FRAME non-nil means that this\n\  
 function will process a switch-frame event if the user switches frames\n\  
 before typing anything.  If the user switches frames in the middle of a\n\  
 key sequence, or at the start of the sequence but CAN-RETURN-SWITCH-FRAME\n\  
 is nil, then the event will be put off until after the current key sequence.\n\  
 \n\  
 `read-key-sequence' checks `function-key-map' for function key\n\  
 sequences, where they wouldn't conflict with ordinary bindings.  See\n\  
 `function-key-map' for more details.\n\  
 \n\  
 The optional fifth argument COMMAND-LOOP, if non-nil, means\n\  
 that this key sequence is being read by something that will\n\  
 read commands one after another.  It should be nil if the caller\n\  
 will read just one key sequence.")  
   (prompt, continue_echo, dont_downcase_last, can_return_switch_frame, command-loop)  
 #endif  
   
8980  DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0,  DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0,
8981    0)         doc: /* Read a sequence of keystrokes and return as a string or vector.
8982    The sequence is sufficient to specify a non-prefix command in the
8983    current local and global maps.
8984    
8985    First arg PROMPT is a prompt string.  If nil, do not prompt specially.
8986    Second (optional) arg CONTINUE-ECHO, if non-nil, means this key echos
8987    as a continuation of the previous key.
8988    
8989    The third (optional) arg DONT-DOWNCASE-LAST, if non-nil, means do not
8990    convert the last event to lower case.  (Normally any upper case event
8991    is converted to lower case if the original event is undefined and the lower
8992    case equivalent is defined.)  A non-nil value is appropriate for reading
8993    a key sequence to be defined.
8994    
8995    A C-g typed while in this function is treated like any other character,
8996    and `quit-flag' is not set.
8997    
8998    If the key sequence starts with a mouse click, then the sequence is read
8999    using the keymaps of the buffer of the window clicked in, not the buffer
9000    of the selected window as normal.
9001    
9002    `read-key-sequence' drops unbound button-down events, since you normally
9003    only care about the click or drag events which follow them.  If a drag
9004    or multi-click event is unbound, but the corresponding click event would
9005    be bound, `read-key-sequence' turns the event into a click event at the
9006    drag's starting position.  This means that you don't have to distinguish
9007    between click and drag, double, or triple events unless you want to.
9008    
9009    `read-key-sequence' prefixes mouse events on mode lines, the vertical
9010    lines separating windows, and scroll bars with imaginary keys
9011    `mode-line', `vertical-line', and `vertical-scroll-bar'.
9012    
9013    Optional fourth argument CAN-RETURN-SWITCH-FRAME non-nil means that this
9014    function will process a switch-frame event if the user switches frames
9015    before typing anything.  If the user switches frames in the middle of a
9016    key sequence, or at the start of the sequence but CAN-RETURN-SWITCH-FRAME
9017    is nil, then the event will be put off until after the current key sequence.
9018    
9019    `read-key-sequence' checks `function-key-map' for function key
9020    sequences, where they wouldn't conflict with ordinary bindings.  See
9021    `function-key-map' for more details.
9022    
9023    The optional fifth argument COMMAND-LOOP, if non-nil, means
9024    that this key sequence is being read by something that will
9025    read commands one after another.  It should be nil if the caller
9026    will read just one key sequence.  */)
9027    (prompt, continue_echo, dont_downcase_last, can_return_switch_frame,    (prompt, continue_echo, dont_downcase_last, can_return_switch_frame,
9028     command_loop)     command_loop)
9029       Lisp_Object prompt, continue_echo, dont_downcase_last;       Lisp_Object prompt, continue_echo, dont_downcase_last;
# Line 9089  DEFUN ("read-key-sequence", Fread_key_se Line 9082  DEFUN ("read-key-sequence", Fread_key_se
9082    
9083  DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,  DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
9084         Sread_key_sequence_vector, 1, 5, 0,         Sread_key_sequence_vector, 1, 5, 0,
9085    "Like `read-key-sequence' but always return a vector.")         doc: /* Like `read-key-sequence' but always return a vector.  */)
9086    (prompt, continue_echo, dont_downcase_last, can_return_switch_frame,       (prompt, continue_echo, dont_downcase_last, can_return_switch_frame,
9087     command_loop)        command_loop)
9088       Lisp_Object prompt, continue_echo, dont_downcase_last;       Lisp_Object prompt, continue_echo, dont_downcase_last;
9089       Lisp_Object can_return_switch_frame, command_loop;       Lisp_Object can_return_switch_frame, command_loop;
9090  {  {
# Line 9143  DEFUN ("read-key-sequence-vector", Fread Line 9136  DEFUN ("read-key-sequence-vector", Fread
9136  }  }
9137    
9138  DEFUN ("command-execute", Fcommand_execute, Scommand_execute, 1, 4, 0,  DEFUN ("command-execute", Fcommand_execute, Scommand_execute, 1, 4, 0,
9139   "Execute CMD as an editor command.\n\         doc: /* Execute CMD as an editor command.
9140  CMD must be a symbol that satisfies the `commandp' predicate.\n\  CMD must be a symbol that satisfies the `commandp' predicate.
9141  Optional second arg RECORD-FLAG non-nil\n\  Optional second arg RECORD-FLAG non-nil
9142  means unconditionally put this command in `command-history'.\n\  means unconditionally put this command in `command-history'.
9143  Otherwise, that is done only if an arg is read using the minibuffer.\n\  Otherwise, that is done only if an arg is read using the minibuffer.
9144  The argument KEYS specifies the value to use instead of (this-command-keys)\n\  The argument KEYS specifies the value to use instead of (this-command-keys)
9145  when reading the arguments; if it is nil, (this-command-keys) is used.\n\  when reading the arguments; if it is nil, (this-command-keys) is used.
9146  The argument SPECIAL, if non-nil, means that this command is executing\n\  The argument SPECIAL, if non-nil, means that this command is executing
9147  a special event, so ignore the prefix argument and don't clear it.")  a special event, so ignore the prefix argument and don't clear it.  */)
9148       (cmd, record_flag, keys, special)       (cmd, record_flag, keys, special)
9149       Lisp_Object cmd, record_flag, keys, special;       Lisp_Object cmd, record_flag, keys, special;
9150  {  {
# Line 9243  a special event, so ignore the prefix ar Line 9236  a special event, so ignore the prefix ar
9236    
9237    
9238  DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_command,  DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_command,
9239    1, 1, "P",         1, 1, "P",
9240    "Read function name, then read its arguments and call it.")         doc: /* Read function name, then read its arguments and call it.  */)
9241    (prefixarg)       (prefixarg)
9242       Lisp_Object prefixarg;       Lisp_Object prefixarg;
9243  {  {
9244    Lisp_Object function;    Lisp_Object function;
# Line 9496  requeued_events_pending_p () Line 9489  requeued_events_pending_p ()
9489    
9490    
9491  DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 0, 0,  DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 0, 0,
9492    "T if command input is currently available with no waiting.\n\         doc: /* T if command input is currently available with no waiting.
9493  Actually, the value is nil only if we can be sure that no input is available.")  Actually, the value is nil only if we can be sure that no input is available.  */)
9494    ()       ()
9495  {  {
9496    if (!NILP (Vunread_command_events) || unread_command_char != -1)    if (!NILP (Vunread_command_events) || unread_command_char != -1)
9497      return (Qt);      return (Qt);
# Line 9508  Actually, the value is nil only if we ca Line 9501  Actually, the value is nil only if we ca
9501  }  }
9502    
9503  DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 0, 0,  DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 0, 0,
9504    "Return vector of last 100 events, not counting those from keyboard macros.")         doc: /* Return vector of last 100 events, not counting those from keyboard macros.  */)
9505    ()       ()
9506  {  {
9507    Lisp_Object *keys = XVECTOR (recent_keys)->contents;    Lisp_Object *keys = XVECTOR (recent_keys)->contents;
9508    Lisp_Object val;    Lisp_Object val;
# Line 9530  DEFUN ("recent-keys", Frecent_keys, Srec Line 9523  DEFUN ("recent-keys", Frecent_keys, Srec
9523  }  }
9524    
9525  DEFUN ("this-command-keys", Fthis_command_keys, Sthis_command_keys, 0, 0, 0,  DEFUN ("this-command-keys", Fthis_command_keys, Sthis_command_keys, 0, 0, 0,
9526    "Return the key sequence that invoked this command.\n\         doc: /* Return the key sequence that invoked this command.
9527  The value is a string or a vector.")  The value is a string or a vector.  */)
9528    ()       ()
9529  {  {
9530    return make_event_array (this_command_key_count,    return make_event_array (this_command_key_count,
9531                             XVECTOR (this_command_keys)->contents);                             XVECTOR (this_command_keys)->contents);
9532  }  }
9533    
9534  DEFUN ("this-command-keys-vector", Fthis_command_keys_vector, Sthis_command_keys_vector, 0, 0, 0,  DEFUN ("this-command-keys-vector", Fthis_command_keys_vector, Sthis_command_keys_vector, 0, 0, 0,
9535    "Return the key sequence that invoked this command, as a vector.")         doc: /* Return the key sequence that invoked this command, as a vector.  */)
9536    ()       ()
9537  {  {
9538    return Fvector (this_command_key_count,    return Fvector (this_command_key_count,
9539                    XVECTOR (this_command_keys)->contents);                    XVECTOR (this_command_keys)->contents);
# Line 9548  DEFUN ("this-command-keys-vector", Fthis Line 9541  DEFUN ("this-command-keys-vector", Fthis
9541    
9542  DEFUN ("this-single-command-keys", Fthis_single_command_keys,  DEFUN ("this-single-command-keys", Fthis_single_command_keys,
9543         Sthis_single_command_keys, 0, 0, 0,         Sthis_single_command_keys, 0, 0, 0,
9544    "Return the key sequence that invoked this command.\n\         doc: /* Return the key sequence that invoked this command.
9545  Unlike `this-command-keys', this function's value\n\  Unlike `this-command-keys', this function's value
9546  does not include prefix arguments.\n\  does not include prefix arguments.
9547  The value is always a vector.")  The value is always a vector.  */)
9548    ()       ()
9549  {  {
9550    return Fvector (this_command_key_count    return Fvector (this_command_key_count
9551                    - this_single_command_key_start,                    - this_single_command_key_start,
# Line 9562  The value is always a vector.") Line 9555  The value is always a vector.")
9555    
9556  DEFUN ("this-single-command-raw-keys", Fthis_single_command_raw_keys,  DEFUN ("this-single-command-raw-keys", Fthis_single_command_raw_keys,
9557         Sthis_single_command_raw_keys, 0, 0, 0,         Sthis_single_command_raw_keys, 0, 0, 0,
9558    "Return the raw events that were read for this command.\n\         doc: /* Return the raw events that were read for this command.
9559  Unlike `this-single-command-keys', this function's value\n\  Unlike `this-single-command-keys', this function's value
9560  shows the events before all translations (except for input methods).\n\  shows the events before all translations (except for input methods).
9561  The value is always a vector.")  The value is always a vector.  */)
9562    ()       ()
9563  {  {
9564    return Fvector (raw_keybuf_count,    return Fvector (raw_keybuf_count,
9565                    (XVECTOR (raw_keybuf)->contents));                    (XVECTOR (raw_keybuf)->contents));
9566  }  }
9567    
9568  DEFUN ("reset-this-command-lengths", Freset_this_command_lengths,  DEFUN ("reset-this-command-lengths", Freset_this_command_lengths,
9569    Sreset_this_command_lengths, 0, 0, 0,         Sreset_this_command_lengths, 0, 0, 0,
9570    "Used for complicated reasons in `universal-argument-other-key'.\n\         doc: /* Used for complicated reasons in `universal-argument-other-key'.
9571  \n\  
9572  `universal-argument-other-key' rereads the event just typed.\n\  `universal-argument-other-key' rereads the event just typed.
9573  It then gets translated through `function-key-map'.\n\  It then gets translated through `function-key-map'.
9574  The translated event gets included in the echo area and in\n\  The translated event gets included in the echo area and in
9575  the value of `this-command-keys' in addition to the raw original event.\n\  the value of `this-command-keys' in addition to the raw original event.
9576  That is not right.\n\  That is not right.
9577  \n\  
9578  Calling this function directs the translated event to replace\n\  Calling this function directs the translated event to replace
9579  the original event, so that only one version of the event actually\n\  the original event, so that only one version of the event actually
9580  appears in the echo area and in the value of `this-command-keys.'.")  appears in the echo area and in the value of `this-command-keys'.  */)
9581    ()       ()
9582  {  {
9583    before_command_restore_flag = 1;    before_command_restore_flag = 1;
9584    before_command_key_count_1 = before_command_key_count;    before_command_key_count_1 = before_command_key_count;
# Line 9594  appears in the echo area and in the valu Line 9587  appears in the echo area and in the valu
9587  }  }
9588    
9589  DEFUN ("clear-this-command-keys", Fclear_this_command_keys,  DEFUN ("clear-this-command-keys", Fclear_this_command_keys,
9590    Sclear_this_command_keys, 0, 0, 0,         Sclear_this_command_keys, 0, 0, 0,
9591    "Clear out the vector that `this-command-keys' returns.\n\         doc: /* Clear out the vector that `this-command-keys' returns.
9592  Clear vector containing last 100 events.")  Clear vector containing last 100 events.  */)
9593    ()       ()
9594  {  {
9595    int i;    int i;
9596        
# Line 9611  Clear vector containing last 100 events. Line 9604  Clear vector containing last 100 events.
9604  }  }
9605    
9606  DEFUN ("recursion-depth", Frecursion_depth, Srecursion_depth, 0, 0, 0,  DEFUN ("recursion-depth", Frecursion_depth, Srecursion_depth, 0, 0, 0,
9607    "Return the current depth in recursive edits.")         doc: /* Return the current depth in recursive edits.  */)
9608    ()       ()
9609  {  {
9610    Lisp_Object temp;    Lisp_Object temp;
9611    XSETFASTINT (temp, command_loop_level + minibuf_level);    XSETFASTINT (temp, command_loop_level + minibuf_level);
# Line 9620  DEFUN ("recursion-depth", Frecursion_dep Line 9613  DEFUN ("recursion-depth", Frecursion_dep
9613  }  }
9614    
9615  DEFUN ("open-dribble-file", Fopen_dribble_file, Sopen_dribble_file, 1, 1,  DEFUN ("open-dribble-file", Fopen_dribble_file, Sopen_dribble_file, 1, 1,
9616    "FOpen dribble file: ",         "FOpen dribble file: ",
9617    "Start writing all keyboard characters to a dribble file called FILE.\n\         doc: /* Start writing all keyboard characters to a dribble file called FILE.
9618  If FILE is nil, close any open dribble file.")  If FILE is nil, close any open dribble file.  */)
9619    (file)       (file)
9620       Lisp_Object file;       Lisp_Object file;
9621  {  {
9622    if (dribble)    if (dribble)
# Line 9642  If FILE is nil, close any open dribble f Line 9635  If FILE is nil, close any open dribble f
9635  }  }
9636    
9637  DEFUN ("discard-input", Fdiscard_input, Sdiscard_input, 0, 0, 0,  DEFUN ("discard-input", Fdiscard_input, Sdiscard_input, 0, 0, 0,
9638    "Discard the contents of the terminal input buffer.\n\         doc: /* Discard the contents of the terminal input buffer.
9639  Also cancel any kbd macro being defined.")  Also cancel any kbd macro being defined.  */)
9640    ()       ()
9641  {  {
9642    current_kboard->defining_kbd_macro = Qnil;    current_kboard->defining_kbd_macro = Qnil;
9643    update_mode_lines++;    update_mode_lines++;
# Line 9662  Also cancel any kbd macro being defined. Line 9655  Also cancel any kbd macro being defined.
9655  }  }
9656    
9657  DEFUN ("suspend-emacs", Fsuspend_emacs, Ssuspend_emacs, 0, 1, "",  DEFUN ("suspend-emacs", Fsuspend_emacs, Ssuspend_emacs, 0, 1, "",
9658    "Stop Emacs and return to superior process.  You can resume later.\n\         doc: /* Stop Emacs and return to superior process.  You can resume later.
9659  If `cannot-suspend' is non-nil, or if the system doesn't support job\n\  If `cannot-suspend' is non-nil, or if the system doesn't support job
9660  control, run a subshell instead.\n\n\  control, run a subshell instead.
9661  If optional arg STUFFSTRING is non-nil, its characters are stuffed\n\  
9662  to be read as terminal input by Emacs's parent, after suspension.\n\  If optional arg STUFFSTRING is non-nil, its characters are stuffed
9663  \n\  to be read as terminal input by Emacs's parent, after suspension.
9664  Before suspending, run the normal hook `suspend-hook'.\n\  
9665  After resumption run the normal hook `suspend-resume-hook'.\n\  Before suspending, run the normal hook `suspend-hook'.
9666  \n\  After resumption run the normal hook `suspend-resume-hook'.
9667  Some operating systems cannot stop the Emacs process and resume it later.\n\  
9668  On such systems, Emacs starts a subshell instead of suspending.")  Some operating systems cannot stop the Emacs process and resume it later.
9669    (stuffstring)  On such systems, Emacs starts a subshell instead of suspending.  */)
9670         (stuffstring)
9671       Lisp_Object stuffstring;       Lisp_Object stuffstring;
9672  {  {
9673    int count = specpdl_ptr - specpdl;    int count = specpdl_ptr - specpdl;
# Line 9972  quit_throw_to_read_char () Line 9966  quit_throw_to_read_char ()
9966  }  }
9967    
9968  DEFUN ("set-input-mode", Fset_input_mode, Sset_input_mode, 3, 4, 0,  DEFUN ("set-input-mode", Fset_input_mode, Sset_input_mode, 3, 4, 0,
9969    "Set mode of reading keyboard input.\n\         doc: /* Set mode of reading keyboard input.
9970  First arg INTERRUPT non-nil means use input interrupts;\n\  First arg INTERRUPT non-nil means use input interrupts;
9971   nil means use CBREAK mode.\n\   nil means use CBREAK mode.
9972  Second arg FLOW non-nil means use ^S/^Q flow control for output to terminal\n\  Second arg FLOW non-nil means use ^S/^Q flow control for output to terminal
9973   (no effect except in CBREAK mode).\n\   (no effect except in CBREAK mode).
9974  Third arg META t means accept 8-bit input (for a Meta key).\n\  Third arg META t means accept 8-bit input (for a Meta key).
9975   META nil means ignore the top bit, on the assumption it is parity.\n\   META nil means ignore the top bit, on the assumption it is parity.
9976   Otherwise, accept 8-bit input and don't use the top bit for Meta.\n\   Otherwise, accept 8-bit input and don't use the top bit for Meta.
9977  Optional fourth arg QUIT if non-nil specifies character to use for quitting.\n\  Optional fourth arg QUIT if non-nil specifies character to use for quitting.
9978  See also `current-input-mode'.")  See also `current-input-mode'.  */)
9979    (interrupt, flow, meta, quit)       (interrupt, flow, meta, quit)
9980       Lisp_Object interrupt, flow, meta, quit;       Lisp_Object interrupt, flow, meta, quit;
9981  {  {
9982    if (!NILP (quit)    if (!NILP (quit)
# Line 10044  See also `current-input-mode'.") Line 10038  See also `current-input-mode'.")
10038  }  }
10039    
10040  DEFUN ("current-input-mode", Fcurrent_input_mode, Scurrent_input_mode, 0, 0, 0,  DEFUN ("current-input-mode", Fcurrent_input_mode, Scurrent_input_mode, 0, 0, 0,
10041    "Return information about the way Emacs currently reads keyboard input.\n\         doc: /* Return information about the way Emacs currently reads keyboard input.
10042  The value is a list of the form (INTERRUPT FLOW META QUIT), where\n\  The value is a list of the form (INTERRUPT FLOW META QUIT), where
10043    INTERRUPT is non-nil if Emacs is using interrupt-driven input; if\n\    INTERRUPT is non-nil if Emacs is using interrupt-driven input; if
10044      nil, Emacs is using CBREAK mode.\n\      nil, Emacs is using CBREAK mode.
10045    FLOW is non-nil if Emacs uses ^S/^Q flow control for output to the\n\    FLOW is non-nil if Emacs uses ^S/^Q flow control for output to the
10046      terminal; this does not apply if Emacs uses interrupt-driven input.\n\      terminal; this does not apply if Emacs uses interrupt-driven input.
10047    META is t if accepting 8-bit input with 8th bit as Meta flag.\n\    META is t if accepting 8-bit input with 8th bit as Meta flag.
10048      META nil means ignoring the top bit, on the assumption it is parity.\n\      META nil means ignoring the top bit, on the assumption it is parity.
10049      META is neither t nor nil if accepting 8-bit input and using\n\      META is neither t nor nil if accepting 8-bit input and using
10050      all 8 bits as the character code.\n\      all 8 bits as the character code.
10051    QUIT is the character Emacs currently uses to quit.\n\    QUIT is the character Emacs currently uses to quit.
10052  The elements of this list correspond to the arguments of\n\  The elements of this list correspond to the arguments of
10053  `set-input-mode'.")  `set-input-mode'.  */)
10054    ()       ()
10055  {  {
10056    Lisp_Object val[4];    Lisp_Object val[4];
10057    
# Line 10492  syms_of_keyboard () Line 10486  syms_of_keyboard ()
10486    defsubr (&Sexecute_extended_command);    defsubr (&Sexecute_extended_command);
10487    
10488    DEFVAR_LISP ("last-command-char", &last_command_char,    DEFVAR_LISP ("last-command-char", &last_command_char,
10489      "Last input event that was part of a command.");                 doc: /* Last input event that was part of a command.  */);
10490    
10491    DEFVAR_LISP_NOPRO ("last-command-event", &last_command_char,    DEFVAR_LISP_NOPRO ("last-command-event", &last_command_char,
10492      "Last input event that was part of a command.");                       doc: /* Last input event that was part of a command.  */);
10493    
10494    DEFVAR_LISP ("last-nonmenu-event", &last_nonmenu_event,    DEFVAR_LISP ("last-nonmenu-event", &last_nonmenu_event,
10495      "Last input event in a command, except for mouse menu events.\n\                 doc: /* Last input event in a command, except for mouse menu events.
10496  Mouse menus give back keys that don't look like mouse events;\n\  Mouse menus give back keys that don't look like mouse events;
10497  this variable holds the actual mouse event that led to the menu,\n\  this variable holds the actual mouse event that led to the menu,
10498  so that you can determine whether the command was run by mouse or not.");  so that you can determine whether the command was run by mouse or not.  */);
10499    
10500    DEFVAR_LISP ("last-input-char", &last_input_char,    DEFVAR_LISP ("last-input-char", &last_input_char,
10501      "Last input event.");                 doc: /* Last input character.  */);
10502    
10503    DEFVAR_LISP_NOPRO ("last-input-event", &last_input_char,    DEFVAR_LISP_NOPRO ("last-input-event", &last_input_char,
10504      "Last input event.");                       doc: /* Last input event.  */);
10505    
10506    DEFVAR_LISP ("unread-command-events", &Vunread_command_events,    DEFVAR_LISP ("unread-command-events", &Vunread_command_events,
10507      "List of events to be read as the command input.\n\                 doc: /* List of events to be read as the command input.
10508  These events are processed first, before actual keyboard input.");  These events are processed first, before actual keyboard input.  */);
10509    Vunread_command_events = Qnil;    Vunread_command_events = Qnil;
10510    
10511    DEFVAR_INT ("unread-command-char", &unread_command_char,    DEFVAR_INT ("unread-command-char", &unread_command_char,
10512      "If not -1, an object to be read as next command input event.");                doc: /* If not -1, an object to be read as next command input event.  */);
10513    
10514    DEFVAR_LISP ("unread-post-input-method-events", &Vunread_post_input_method_events,    DEFVAR_LISP ("unread-post-input-method-events", &Vunread_post_input_method_events,
10515      "List of events to be processed as input by input methods.\n\                 doc: /* List of events to be processed as input by input methods.
10516  These events are processed after `unread-command-events', but\n\  These events are processed after `unread-command-events', but
10517  before actual keyboard input.");  before actual keyboard input.  */);
10518    Vunread_post_input_method_events = Qnil;    Vunread_post_input_method_events = Qnil;
10519    
10520    DEFVAR_LISP ("unread-input-method-events", &Vunread_input_method_events,    DEFVAR_LISP ("unread-input-method-events", &Vunread_input_method_events,
10521      "List of events to be processed as input by input methods.\n\                 doc: /* List of events to be processed as input by input methods.
10522  These events are processed after `unread-command-events', but\n\  These events are processed after `unread-command-events', but
10523  before actual keyboard input.");  before actual keyboard input.  */);
10524    Vunread_input_method_events = Qnil;    Vunread_input_method_events = Qnil;
10525    
10526    DEFVAR_LISP ("meta-prefix-char", &meta_prefix_char,    DEFVAR_LISP ("meta-prefix-char", &meta_prefix_char,
10527      "Meta-prefix character code.\n\                 doc: /* Meta-prefix character code.
10528  Meta-foo as command input turns into this character followed by foo.");  Meta-foo as command input turns into this character followed by foo.  */);
10529    XSETINT (meta_prefix_char, 033);    XSETINT (meta_prefix_char, 033);
10530    
10531    DEFVAR_KBOARD ("last-command", Vlast_command,    DEFVAR_KBOARD ("last-command", Vlast_command,
10532      "The last command executed.\n\                   doc: /* The last command executed.
10533  Normally a symbol with a function definition, but can be whatever was found\n\  Normally a symbol with a function definition, but can be whatever was found
10534  in the keymap, or whatever the variable `this-command' was set to by that\n\  in the keymap, or whatever the variable `this-command' was set to by that
10535  command.\n\  command.
10536  \n\  
10537  The value `mode-exit' is special; it means that the previous command\n\  The value `mode-exit' is special; it means that the previous command
10538  read an event that told it to exit, and it did so and unread that event.\n\  read an event that told it to exit, and it did so and unread that event.
10539  In other words, the present command is the event that made the previous\n\  In other words, the present command is the event that made the previous
10540  command exit.\n\  command exit.
10541  \n\  
10542  The value `kill-region' is special; it means that the previous command\n\  The value `kill-region' is special; it means that the previous command
10543  was a kill command.");  was a kill command.  */);
10544    
10545    DEFVAR_KBOARD ("real-last-command", Vreal_last_command,    DEFVAR_KBOARD ("real-last-command", Vreal_last_command,
10546      "Same as `last-command', but never altered by Lisp code.");                   doc: /* Same as `last-command', but never altered by Lisp code.  */);
10547    
10548    DEFVAR_LISP ("this-command", &Vthis_command,    DEFVAR_LISP ("this-command", &Vthis_command,
10549      "The command now being executed.\n\                 doc: /* The command now being executed.
10550  The command can set this variable; whatever is put here\n\  The command can set this variable; whatever is put here
10551  will be in `last-command' during the following command.");  will be in `last-command' during the following command.  */);
10552    Vthis_command = Qnil;    Vthis_command = Qnil;
10553    
10554    DEFVAR_INT ("auto-save-interval", &auto_save_interval,    DEFVAR_INT ("auto-save-interval", &auto_save_interval,
10555      "*Number of input events between auto-saves.\n\                doc: /* *Number of input events between auto-saves.
10556  Zero means disable autosaving due to number of characters typed.");  Zero means disable autosaving due to number of characters typed.  */);
10557    auto_save_interval = 300;    auto_save_interval = 300;
10558    
10559    DEFVAR_LISP ("auto-save-timeout", &Vauto_save_timeout,    DEFVAR_LISP ("auto-save-timeout", &Vauto_save_timeout,
10560      "*Number of seconds idle time before auto-save.\n\                 doc: /* *Number of seconds idle time before auto-save.
10561  Zero or nil means disable auto-saving due to idleness.\n\  Zero or nil means disable auto-saving due to idleness.
10562  After auto-saving due to this many seconds of idle time,\n\  After auto-saving due to this many seconds of idle time,
10563  Emacs also does a garbage collection if that seems to be warranted.");  Emacs also does a garbage collection if that seems to be warranted.  */);
10564    XSETFASTINT (Vauto_save_timeout, 30);    XSETFASTINT (Vauto_save_timeout, 30);
10565    
10566    DEFVAR_LISP ("echo-keystrokes", &Vecho_keystrokes,    DEFVAR_LISP ("echo-keystrokes", &Vecho_keystrokes,
10567      "*Nonzero means echo unfinished commands after this many seconds of pause.\n\                 doc: /* *Nonzero means echo unfinished commands after this many seconds of pause.
10568  The value may be integer or floating point.");  The value may be integer or floating point.  */);
10569    Vecho_keystrokes = make_number (1);    Vecho_keystrokes = make_number (1);
10570    
10571    DEFVAR_INT ("polling-period", &polling_period,    DEFVAR_INT ("polling-period", &polling_period,
10572      "*Interval between polling for input during Lisp execution.\n\                doc: /* *Interval between polling for input during Lisp execution.
10573  The reason for polling is to make C-g work to stop a running program.\n\  The reason for polling is to make C-g work to stop a running program.
10574  Polling is needed only when using X windows and SIGIO does not work.\n\  Polling is needed only when using X windows and SIGIO does not work.
10575  Polling is automatically disabled in all other cases.");  Polling is automatically disabled in all other cases.  */);
10576    polling_period = 2;    polling_period = 2;
10577    
10578    DEFVAR_LISP ("double-click-time", &Vdouble_click_time,    DEFVAR_LISP ("double-click-time", &Vdouble_click_time,
10579      "*Maximum time between mouse clicks to make a double-click.\n\                 doc: /* *Maximum time between mouse clicks to make a double-click.
10580  Measured in milliseconds.  nil means disable double-click recognition;\n\  Measured in milliseconds.  nil means disable double-click recognition;
10581  t means double-clicks have no time limit and are detected\n\  t means double-clicks have no time limit and are detected
10582  by position only.");  by position only.  */);
10583    Vdouble_click_time = make_number (500);    Vdouble_click_time = make_number (500);
10584    
10585    DEFVAR_INT ("double-click-fuzz", &double_click_fuzz,    DEFVAR_INT ("double-click-fuzz", &double_click_fuzz,
10586      "*Maximum mouse movement between clicks to make a double-click.\n\                doc: /* *Maximum mouse movement between clicks to make a double-click.
10587  On window-system frames, value is the number of pixels the mouse may have\n\  On window-system frames, value is the number of pixels the mouse may have
10588  moved horizontally or vertically between two clicks to make a double-click.\n\  moved horizontally or vertically between two clicks to make a double-click.
10589  On non window-system frames, value is interpreted in units of 1/8 characters\n\  On non window-system frames, value is interpreted in units of 1/8 characters
10590  instead of pixels.");  instead of pixels.  */);
10591    double_click_fuzz = 3;    double_click_fuzz = 3;
10592        
10593    DEFVAR_BOOL ("inhibit-local-menu-bar-menus", &inhibit_local_menu_bar_menus,    DEFVAR_BOOL ("inhibit-local-menu-bar-menus", &inhibit_local_menu_bar_menus,
10594      "*Non-nil means inhibit local map menu bar menus.");                 doc: /* *Non-nil means inhibit local map menu bar menus.  */);
10595    inhibit_local_menu_bar_menus = 0;    inhibit_local_menu_bar_menus = 0;
10596    
10597    DEFVAR_INT ("num-input-keys", &num_input_keys,    DEFVAR_INT ("num-input-keys", &num_input_keys,
10598      "Number of complete key sequences read as input so far.\n\                doc: /* Number of complete key sequences read as input so far.
10599  This includes key sequences read from keyboard macros.\n\  This includes key sequences read from keyboard macros.
10600  The number is effectively the number of interactive command invocations.");  The number is effectively the number of interactive command invocations.  */);
10601    num_input_keys = 0;    num_input_keys = 0;
10602    
10603    DEFVAR_INT ("num-nonmacro-input-events", &num_nonmacro_input_events,    DEFVAR_INT ("num-nonmacro-input-events", &num_nonmacro_input_events,
10604      "Number of input events read from the keyboard so far.\n\                doc: /* Number of input events read from the keyboard so far.
10605  This does not include events generated by keyboard macros.");  This does not include events generated by keyboard macros.  */);
10606    num_nonmacro_input_events = 0;    num_nonmacro_input_events = 0;
10607    
10608    DEFVAR_LISP ("last-event-frame", &Vlast_event_frame,    DEFVAR_LISP ("last-event-frame", &Vlast_event_frame,
10609      "The frame in which the most recently read event occurred.\n\                 doc: /* The frame in which the most recently read event occurred.
10610  If the last event came from a keyboard macro, this is set to `macro'.");  If the last event came from a keyboard macro, this is set to `macro'.  */);
10611    Vlast_event_frame = Qnil;    Vlast_event_frame = Qnil;
10612    
10613    /* This variable is set up in sysdep.c.  */    /* This variable is set up in sysdep.c.  */
10614    DEFVAR_LISP ("tty-erase-char", &Vtty_erase_char,    DEFVAR_LISP ("tty-erase-char", &Vtty_erase_char,
10615      "The ERASE character as set by the user with stty.");                 doc: /* The ERASE character as set by the user with stty.  */);
10616    
10617    DEFVAR_LISP ("help-char", &Vhelp_char,    DEFVAR_LISP ("help-char", &Vhelp_char,
10618      "Character to recognize as meaning Help.\n\                 doc: /* Character to recognize as meaning Help.
10619  When it is read, do `(eval help-form)', and display result if it's a string.\n\  When it is read, do `(eval help-form)', and display result if it's a string.
10620  If the value of `help-form' is nil, this char can be read normally.");  If the value of `help-form' is nil, this char can be read normally.  */);
10621    XSETINT (Vhelp_char, Ctl ('H'));    XSETINT (Vhelp_char, Ctl ('H'));
10622    
10623    DEFVAR_LISP ("help-event-list", &Vhelp_event_list,    DEFVAR_LISP ("help-event-list", &Vhelp_event_list,
10624      "List of input events to recognize as meaning Help.\n\                 doc: /* List of input events to recognize as meaning Help.
10625  These work just like the value of `help-char' (see that).");  These work just like the value of `help-char' (see that).  */);
10626    Vhelp_event_list = Qnil;    Vhelp_event_list = Qnil;
10627    
10628    DEFVAR_LISP ("help-form", &Vhelp_form,    DEFVAR_LISP ("help-form", &Vhelp_form,
10629      "Form to execute when character `help-char' is read.\n\                 doc: /* Form to execute when character `help-char' is read.
10630  If the form returns a string, that string is displayed.\n\  If the form returns a string, that string is displayed.
10631  If `help-form' is nil, the help char is not recognized.");  If `help-form' is nil, the help char is not recognized.  */);
10632    Vhelp_form = Qnil;    Vhelp_form = Qnil;
10633    
10634    DEFVAR_LISP ("prefix-help-command", &Vprefix_help_command,    DEFVAR_LISP ("prefix-help-command", &Vprefix_help_command,
10635      "Command to run when `help-char' character follows a prefix key.\n\                 doc: /* Command to run when `help-char' character follows a prefix key.
10636  This command is used only when there is no actual binding\n\  This command is used only when there is no actual binding
10637  for that character after that prefix key.");  for that character after that prefix key.  */);
10638    Vprefix_help_command = Qnil;    Vprefix_help_command = Qnil;
10639    
10640    DEFVAR_LISP ("top-level", &Vtop_level,    DEFVAR_LISP ("top-level", &Vtop_level,
10641      "Form to evaluate when Emacs starts up.\n\                 doc: /* Form to evaluate when Emacs starts up.
10642  Useful to set before you dump a modified Emacs.");  Useful to set before you dump a modified Emacs.  */);
10643    Vtop_level = Qnil;    Vtop_level = Qnil;
10644    
10645    DEFVAR_LISP ("keyboard-translate-table", &Vkeyboard_translate_table,    DEFVAR_LISP ("keyboard-translate-table", &Vkeyboard_translate_table,
10646      "Translate table for keyboard input, or nil.\n\                 doc: /* Translate table for keyboard input, or nil.
10647  Each character is looked up in this string and the contents used instead.\n\  Each character is looked up in this string and the contents used instead.
10648  The value may be a string, a vector, or a char-table.\n\  The value may be a string, a vector, or a char-table.
10649  If it is a string or vector of length N,\n\  If it is a string or vector of length N,
10650  character codes N and up are untranslated.\n\  character codes N and up are untranslated.
10651  In a vector or a char-table, an element which is nil means \"no translation\".");  In a vector or a char-table, an element which is nil means "no translation".  */);
10652    Vkeyboard_translate_table = Qnil;    Vkeyboard_translate_table = Qnil;
10653    
10654    DEFVAR_BOOL ("cannot-suspend", &cannot_suspend,    DEFVAR_BOOL ("cannot-suspend", &cannot_suspend,
10655      "Non-nil means to always spawn a subshell instead of suspending.\n\                 doc: /* Non-nil means to always spawn a subshell instead of suspending.
10656  \(Even if the operating system has support for stopping a process.\)");  \(Even if the operating system has support for stopping a process.\)  */);
10657    cannot_suspend = 0;    cannot_suspend = 0;
10658    
10659    DEFVAR_BOOL ("menu-prompting", &menu_prompting,    DEFVAR_BOOL ("menu-prompting", &menu_prompting,
10660      "Non-nil means prompt with menus when appropriate.\n\                 doc: /* Non-nil means prompt with menus when appropriate.
10661  This is done when reading from a keymap that has a prompt string,\n\  This is done when reading from a keymap that has a prompt string,
10662  for elements that have prompt strings.\n\  for elements that have prompt strings.
10663  The menu is displayed on the screen\n\  The menu is displayed on the screen
10664  if X menus were enabled at configuration\n\  if X menus were enabled at configuration
10665  time and the previous event was a mouse click prefix key.\n\  time and the previous event was a mouse click prefix key.
10666  Otherwise, menu prompting uses the echo area.");  Otherwise, menu prompting uses the echo area.  */);
10667    menu_prompting = 1;    menu_prompting = 1;
10668    
10669    DEFVAR_LISP ("menu-prompt-more-char", &menu_prompt_more_char,    DEFVAR_LISP ("menu-prompt-more-char", &menu_prompt_more_char,
10670      "Character to see next line of menu prompt.\n\                 doc: /* Character to see next line of menu prompt.
10671  Type this character while in a menu prompt to rotate around the lines of it.");  Type this character while in a menu prompt to rotate around the lines of it.  */);
10672    XSETINT (menu_prompt_more_char, ' ');    XSETINT (menu_prompt_more_char, ' ');
10673    
10674    DEFVAR_INT ("extra-keyboard-modifiers", &extra_keyboard_modifiers,    DEFVAR_INT ("extra-keyboard-modifiers", &extra_keyboard_modifiers,
10675      "A mask of additional modifier keys to use with every keyboard character.\n\                doc: /* A mask of additional modifier keys to use with every keyboard character.
10676  Emacs applies the modifiers of the character stored here to each keyboard\n\  Emacs applies the modifiers of the character stored here to each keyboard
10677  character it reads.  For example, after evaluating the expression\n\  character it reads.  For example, after evaluating the expression
10678      (setq extra-keyboard-modifiers ?\\C-x)\n\      (setq extra-keyboard-modifiers ?\\C-x)
10679  all input characters will have the control modifier applied to them.\n\  all input characters will have the control modifier applied to them.
10680  \n\  
10681  Note that the character ?\\C-@, equivalent to the integer zero, does\n\  Note that the character ?\\C-@, equivalent to the integer zero, does
10682  not count as a control character; rather, it counts as a character\n\  not count as a control character; rather, it counts as a character
10683  with no modifiers; thus, setting `extra-keyboard-modifiers' to zero\n\  with no modifiers; thus, setting `extra-keyboard-modifiers' to zero
10684  cancels any modification.");  cancels any modification.  */);
10685    extra_keyboard_modifiers = 0;    extra_keyboard_modifiers = 0;
10686    
10687    DEFVAR_LISP ("deactivate-mark", &Vdeactivate_mark,    DEFVAR_LISP ("deactivate-mark", &Vdeactivate_mark,
10688      "If an editing command sets this to t, deactivate the mark afterward.\n\                 doc: /* If an editing command sets this to t, deactivate the mark afterward.
10689  The command loop sets this to nil before each command,\n\  The command loop sets this to nil before each command,
10690  and tests the value when the command returns.\n\  and tests the value when the command returns.
10691  Buffer modification stores t in this variable.");  Buffer modification stores t in this variable.  */);
10692    Vdeactivate_mark = Qnil;    Vdeactivate_mark = Qnil;
10693    
10694    DEFVAR_LISP ("command-hook-internal", &Vcommand_hook_internal,    DEFVAR_LISP ("command-hook-internal", &Vcommand_hook_internal,
10695      "Temporary storage of pre-command-hook or post-command-hook.");                 doc: /* Temporary storage of pre-command-hook or post-command-hook.  */);
10696    Vcommand_hook_internal = Qnil;    Vcommand_hook_internal = Qnil;
10697    
10698    DEFVAR_LISP ("pre-command-hook", &Vpre_command_hook,    DEFVAR_LISP ("pre-command-hook", &Vpre_command_hook,
10699      "Normal hook run before each command is executed.\n\                 doc: /* Normal hook run before each command is executed.
10700  If an unhandled error happens in running this hook,\n\  If an unhandled error happens in running this hook,
10701  the hook value is set to nil, since otherwise the error\n\  the hook value is set to nil, since otherwise the error
10702  might happen repeatedly and make Emacs nonfunctional.");  might happen repeatedly and make Emacs nonfunctional.  */);
10703    Vpre_command_hook = Qnil;    Vpre_command_hook = Qnil;
10704    
10705    DEFVAR_LISP ("post-command-hook", &Vpost_command_hook,    DEFVAR_LISP ("post-command-hook", &Vpost_command_hook,
10706      "Normal hook run after each command is executed.\n\                 doc: /* Normal hook run after each command is executed.
10707  If an unhandled error happens in running this hook,\n\  If an unhandled error happens in running this hook,
10708  the hook value is set to nil, since otherwise the error\n\  the hook value is set to nil, since otherwise the error
10709  might happen repeatedly and make Emacs nonfunctional.");  might happen repeatedly and make Emacs nonfunctional.  */);
10710    Vpost_command_hook = Qnil;    Vpost_command_hook = Qnil;
10711    
10712    DEFVAR_LISP ("post-command-idle-hook", &Vpost_command_idle_hook,    DEFVAR_LISP ("post-command-idle-hook", &Vpost_command_idle_hook,
10713      "Normal hook run after each command is executed, if idle.\n\                 doc: /* Normal hook run after each command is executed, if idle.
10714  Errors running the hook are caught and ignored.\n\  Errors running the hook are caught and ignored.
10715  This feature is obsolete; use idle timers instead.  See `etc/NEWS'.");  This feature is obsolete; use idle timers instead.  See `etc/NEWS'.  */);
10716    Vpost_command_idle_hook = Qnil;    Vpost_command_idle_hook = Qnil;
10717    
10718    DEFVAR_INT ("post-command-idle-delay", &post_command_idle_delay,    DEFVAR_INT ("post-command-idle-delay", &post_command_idle_delay,
10719      "Delay time before running `post-command-idle-hook'.\n\                doc: /* Delay time before running `post-command-idle-hook'.
10720  This is measured in microseconds.");  This is measured in microseconds.  */);
10721    post_command_idle_delay = 100000;    post_command_idle_delay = 100000;
10722    
10723  #if 0  #if 0
10724    DEFVAR_LISP ("echo-area-clear-hook", ...,    DEFVAR_LISP ("echo-area-clear-hook", ...,
10725      "Normal hook run when clearing the echo area.");                 doc: /* Normal hook run when clearing the echo area.  */);
10726  #endif  #endif
10727    Qecho_area_clear_hook = intern ("echo-area-clear-hook");    Qecho_area_clear_hook = intern ("echo-area-clear-hook");
10728    SET_SYMBOL_VALUE (Qecho_area_clear_hook, Qnil);    SET_SYMBOL_VALUE (Qecho_area_clear_hook, Qnil);
10729    
10730    DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag,    DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag,
10731      "t means menu bar, specified Lucid style, needs to be recomputed.");                 doc: /* t means menu bar, specified Lucid style, needs to be recomputed.  */);
10732    Vlucid_menu_bar_dirty_flag = Qnil;    Vlucid_menu_bar_dirty_flag = Qnil;
10733    
10734    DEFVAR_LISP ("menu-bar-final-items", &Vmenu_bar_final_items,    DEFVAR_LISP ("menu-bar-final-items", &Vmenu_bar_final_items,
10735      "List of menu bar items to move to the end of the menu bar.\n\                 doc: /* List of menu bar items to move to the end of the menu bar.
10736  The elements of the list are event types that may have menu bar bindings.");  The elements of the list are event types that may have menu bar bindings.  */);
10737    Vmenu_bar_final_items = Qnil;    Vmenu_bar_final_items = Qnil;
10738    
10739    DEFVAR_KBOARD ("overriding-terminal-local-map",    DEFVAR_KBOARD ("overriding-terminal-local-map",
10740                   Voverriding_terminal_local_map,                   Voverriding_terminal_local_map,
10741      "Per-terminal keymap that overrides all other local keymaps.\n\                   doc: /* Per-terminal keymap that overrides all other local keymaps.
10742  If this variable is non-nil, it is used as a keymap instead of the\n\  If this variable is non-nil, it is used as a keymap instead of the
10743  buffer's local map, and the minor mode keymaps and text property keymaps.\n\  buffer's local map, and the minor mode keymaps and text property keymaps.
10744  This variable is intended to let commands such as `universal-argument'\n\  This variable is intended to let commands such as `universal-argument'
10745  set up a different keymap for reading the next command.");  set up a different keymap for reading the next command.  */);
10746    
10747    DEFVAR_LISP ("overriding-local-map", &Voverriding_local_map,    DEFVAR_LISP ("overriding-local-map", &Voverriding_local_map,
10748      "Keymap that overrides all other local keymaps.\n\                 doc: /* Keymap that overrides all other local keymaps.
10749  If this variable is non-nil, it is used as a keymap instead of the\n\  If this variable is non-nil, it is used as a keymap instead of the
10750  buffer's local map, and the minor mode keymaps and text property keymaps.");  buffer's local map, and the minor mode keymaps and text property keymaps.  */);
10751    Voverriding_local_map = Qnil;    Voverriding_local_map = Qnil;
10752    
10753    DEFVAR_LISP ("overriding-local-map-menu-flag", &Voverriding_local_map_menu_flag,    DEFVAR_LISP ("overriding-local-map-menu-flag", &Voverriding_local_map_menu_flag,
10754      "Non-nil means `overriding-local-map' applies to the menu bar.\n\                 doc: /* Non-nil means `overriding-local-map' applies to the menu bar.
10755  Otherwise, the menu bar continues to reflect the buffer's local map\n\  Otherwise, the menu bar continues to reflect the buffer's local map
10756  and the minor mode maps regardless of `overriding-local-map'.");  and the minor mode maps regardless of `overriding-local-map'.  */);
10757    Voverriding_local_map_menu_flag = Qnil;    Voverriding_local_map_menu_flag = Qnil;
10758    
10759    DEFVAR_LISP ("special-event-map", &Vspecial_event_map,    DEFVAR_LISP ("special-event-map", &Vspecial_event_map,
10760      "Keymap defining bindings for special events to execute at low level.");                 doc: /* Keymap defining bindings for special events to execute at low level.  */);
10761    Vspecial_event_map = Fcons (intern ("keymap"), Qnil);    Vspecial_event_map = Fcons (intern ("keymap"), Qnil);
10762    
10763    DEFVAR_LISP ("track-mouse", &do_mouse_tracking,    DEFVAR_LISP ("track-mouse", &do_mouse_tracking,
10764      "*Non-nil means generate motion events for mouse motion.");                 doc: /* *Non-nil means generate motion events for mouse motion.  */);
10765    
10766    DEFVAR_KBOARD ("system-key-alist", Vsystem_key_alist,    DEFVAR_KBOARD ("system-key-alist", Vsystem_key_alist,
10767      "Alist of system-specific X windows key symbols.\n\                   doc: /* Alist of system-specific X windows key symbols.
10768  Each element should have the form (N . SYMBOL) where N is the\n\  Each element should have the form (N . SYMBOL) where N is the
10769  numeric keysym code (sans the \"system-specific\" bit 1<<28)\n\  numeric keysym code (sans the \"system-specific\" bit 1<<28)
10770  and SYMBOL is its name.");  and SYMBOL is its name.  */);
10771    
10772    DEFVAR_LISP ("deferred-action-list", &Vdeferred_action_list,    DEFVAR_LISP ("deferred-action-list", &Vdeferred_action_list,
10773      "List of deferred actions to be performed at a later time.\n\                 doc: /* List of deferred actions to be performed at a later time.
10774  The precise format isn't relevant here; we just check whether it is nil.");  The precise format isn't relevant here; we just check whether it is nil.  */);
10775    Vdeferred_action_list = Qnil;    Vdeferred_action_list = Qnil;
10776    
10777    DEFVAR_LISP ("deferred-action-function", &Vdeferred_action_function,    DEFVAR_LISP ("deferred-action-function", &Vdeferred_action_function,
10778      "Function to call to handle deferred actions, after each command.\n\                 doc: /* Function to call to handle deferred actions, after each command.
10779  This function is called with no arguments after each command\n\  This function is called with no arguments after each command
10780  whenever `deferred-action-list' is non-nil.");  whenever `deferred-action-list' is non-nil.  */);
10781    Vdeferred_action_function = Qnil;    Vdeferred_action_function = Qnil;
10782    
10783    DEFVAR_LISP ("suggest-key-bindings", &Vsuggest_key_bindings,    DEFVAR_LISP ("suggest-key-bindings", &Vsuggest_key_bindings,
10784      "*Non-nil means show the equivalent key-binding when M-x command has one.\n\                 doc: /* *Non-nil means show the equivalent key-binding when M-x command has one.
10785  The value can be a length of time to show the message for.\n\  The value can be a length of time to show the message for.
10786  If the value is non-nil and not a number, we wait 2 seconds.");  If the value is non-nil and not a number, we wait 2 seconds.  */);
10787    Vsuggest_key_bindings = Qt;    Vsuggest_key_bindings = Qt;
10788    
10789    DEFVAR_LISP ("timer-list", &Vtimer_list,    DEFVAR_LISP ("timer-list", &Vtimer_list,
10790      "List of active absolute time timers in order of increasing time");                 doc: /* List of active absolute time timers in order of increasing time.  */);
10791    Vtimer_list = Qnil;    Vtimer_list = Qnil;
10792    
10793    DEFVAR_LISP ("timer-idle-list", &Vtimer_idle_list,    DEFVAR_LISP ("timer-idle-list", &Vtimer_idle_list,
10794      "List of active idle-time timers in order of increasing time");                 doc: /* List of active idle-time timers in order of increasing time.  */);
10795    Vtimer_idle_list = Qnil;    Vtimer_idle_list = Qnil;
10796    
10797    DEFVAR_LISP ("input-method-function", &Vinput_method_function,    DEFVAR_LISP ("input-method-function", &Vinput_method_function,
10798      "If non-nil, the function that implements the current input method.\n\                 doc: /* If non-nil, the function that implements the current input method.
10799  It's called with one argument, a printing character that was just read.\n\  It's called with one argument, a printing character that was just read.
10800  \(That means a character with code 040...0176.)\n\  \(That means a character with code 040...0176.)
10801  Typically this function uses `read-event' to read additional events.\n\  Typically this function uses `read-event' to read additional events.
10802  When it does so, it should first bind `input-method-function' to nil\n\  When it does so, it should first bind `input-method-function' to nil
10803  so it will not be called recursively.\n\  so it will not be called recursively.
10804  \n\  
10805  The function should return a list of zero or more events\n\  The function should return a list of zero or more events
10806  to be used as input.  If it wants to put back some events\n\  to be used as input.  If it wants to put back some events
10807  to be reconsidered, separately, by the input method,\n\  to be reconsidered, separately, by the input method,
10808  it can add them to the beginning of `unread-command-events'.\n\  it can add them to the beginning of `unread-command-events'.
10809  \n\  
10810  The input method function can find in `input-method-previous-method'\n\  The input method function can find in `input-method-previous-method'
10811  the previous echo area message.\n\  the previous echo area message.
10812  \n\  
10813  The input method function should refer to the variables\n\  The input method function should refer to the variables
10814  `input-method-use-echo-area' and `input-method-exit-on-first-char'\n\  `input-method-use-echo-area' and `input-method-exit-on-first-char'
10815  for guidance on what to do.");  for guidance on what to do.  */);
10816    Vinput_method_function = Qnil;    Vinput_method_function = Qnil;
10817    
10818    DEFVAR_LISP ("input-method-previous-message",    DEFVAR_LISP ("input-method-previous-message",
10819                 &Vinput_method_previous_message,                 &Vinput_method_previous_message,
10820      "When `input-method-function' is called, hold the previous echo area message.\n\                 doc: /* When `input-method-function' is called, hold the previous echo area message.
10821  This variable exists because `read-event' clears the echo area\n\  This variable exists because `read-event' clears the echo area
10822  before running the input method.  It is nil if there was no message.");  before running the input method.  It is nil if there was no message.  */);
10823    Vinput_method_previous_message = Qnil;    Vinput_method_previous_message = Qnil;
10824    
10825    DEFVAR_LISP ("show-help-function", &Vshow_help_function,    DEFVAR_LISP ("show-help-function", &Vshow_help_function,
10826      "If non-nil, the function that implements the display of help.\n\                 doc: /* If non-nil, the function that implements the display of help.
10827  It's called with one argument, the help string to display.");  It's called with one argument, the help string to display.  */);
10828    Vshow_help_function = Qnil;    Vshow_help_function = Qnil;
10829    
10830    DEFVAR_LISP ("disable-point-adjustment", &Vdisable_point_adjustment,    DEFVAR_LISP ("disable-point-adjustment", &Vdisable_point_adjustment,
10831      "If non-nil, suppress point adjustment after executing a command.\n\                 doc: /* If non-nil, suppress point adjustment after executing a command.
10832  \n\  
10833  After a command is executed, if point is moved into a region that has\n\  After a command is executed, if point is moved into a region that has
10834  special properties (e.g. composition, display), we adjust point to\n\  special properties (e.g. composition, display), we adjust point to
10835  the boundary of the region.  But, several special commands sets this\n\  the boundary of the region.  But, several special commands sets this
10836  variable to non-nil, then we suppress the point adjustment.\n\  variable to non-nil, then we suppress the point adjustment.
10837  \n\  
10838  This variable is set to nil before reading a command, and is checked\n\  This variable is set to nil before reading a command, and is checked
10839  just after executing the command");  just after executing the command.  */);
10840    Vdisable_point_adjustment = Qnil;    Vdisable_point_adjustment = Qnil;
10841    
10842    DEFVAR_LISP ("global-disable-point-adjustment",    DEFVAR_LISP ("global-disable-point-adjustment",
10843                 &Vglobal_disable_point_adjustment,                 &Vglobal_disable_point_adjustment,
10844      "*If non-nil, always suppress point adjustment.\n\                 doc: /* *If non-nil, always suppress point adjustment.
10845  \n\  
10846  The default value is nil, in which case, point adjustment are\n\  The default value is nil, in which case, point adjustment are
10847  suppressed only after special commands that set\n\  suppressed only after special commands that set
10848  `disable-point-adjustment' (which see) to non-nil.");  `disable-point-adjustment' (which see) to non-nil.  */);
10849    Vglobal_disable_point_adjustment = Qnil;    Vglobal_disable_point_adjustment = Qnil;
10850    
10851    DEFVAR_BOOL ("update-menu-bindings", &update_menu_bindings,    DEFVAR_BOOL ("update-menu-bindings", &update_menu_bindings,
10852      "Non-nil means updating menu bindings is allowed.\n\                 doc: /* Non-nil means updating menu bindings is allowed.
10853  A value of nil means menu bindings should not be updated.\n\  A value of nil means menu bindings should not be updated.
10854  Used during Emacs' startup.");  Used during Emacs' startup.  */);
10855    update_menu_bindings = 1;    update_menu_bindings = 1;
10856    
10857    DEFVAR_LISP ("minibuffer-message-timeout", &Vminibuffer_message_timeout,    DEFVAR_LISP ("minibuffer-message-timeout", &Vminibuffer_message_timeout,
10858      "*How long to display an echo-area message when the minibuffer is active.\n\                 doc: /* *How long to display an echo-area message when the minibuffer is active.
10859  If the value is not a number, such messages don't time out.");  If the value is not a number, such messages don't time out.  */);
10860    Vminibuffer_message_timeout = make_number (2);    Vminibuffer_message_timeout = make_number (2);
10861  }  }
10862    

Legend:
Removed from v.1.633  
changed lines
  Added in v.1.634

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