Resorted; add missing Morohashi's Daikanwa characters; add missing
[chise/xemacs-chise.git] / info / lispref.info-18
index 00f586c..47f826c 100644 (file)
@@ -50,6 +50,57 @@ may be included in a translation approved by the Free Software
 Foundation instead of in the original English.
 
 \1f
+File: lispref.info,  Node: Waiting,  Next: Quitting,  Prev: Reading Input,  Up: Command Loop
+
+Waiting for Elapsed Time or Input
+=================================
+
+   The wait functions are designed to wait for a certain amount of time
+to pass or until there is input.  For example, you may wish to pause in
+the middle of a computation to allow the user time to view the display.
+`sit-for' pauses and updates the screen, and returns immediately if
+input comes in, while `sleep-for' pauses without updating the screen.
+
+   Note that in FSF Emacs, the commands `sit-for' and `sleep-for' take
+two arguments to specify the time (one integer and one float value),
+instead of a single argument that can be either an integer or a float.
+
+ - Function: sit-for seconds &optional nodisp
+     This function performs redisplay (provided there is no pending
+     input from the user), then waits SECONDS seconds, or until input is
+     available.  The result is `t' if `sit-for' waited the full time
+     with no input arriving (see `input-pending-p' in *Note Peeking and
+     Discarding::).  Otherwise, the value is `nil'.
+
+     The argument SECONDS need not be an integer.  If it is a floating
+     point number, `sit-for' waits for a fractional number of seconds.
+
+     Redisplay is normally preempted if input arrives, and does not
+     happen at all if input is available before it starts. (You can
+     force screen updating in such a case by using `force-redisplay'.
+     *Note Refresh Screen::.) If there is no input pending, you can
+     force an update with no delay by using `(sit-for 0)'.
+
+     If NODISP is non-`nil', then `sit-for' does not redisplay, but it
+     still returns as soon as input is available (or when the timeout
+     elapses).
+
+     The usual purpose of `sit-for' is to give the user time to read
+     text that you display.
+
+ - Function: sleep-for seconds
+     This function simply pauses for SECONDS seconds without updating
+     the display.  This function pays no attention to available input.
+     It returns `nil'.
+
+     The argument SECONDS need not be an integer.  If it is a floating
+     point number, `sleep-for' waits for a fractional number of seconds.
+
+     Use `sleep-for' when you wish to guarantee a delay.
+
+   *Note Time of Day::, for functions to get the current time.
+
+\1f
 File: lispref.info,  Node: Quitting,  Next: Prefix Command Arguments,  Prev: Waiting,  Up: Command Loop
 
 Quitting
@@ -756,18 +807,18 @@ second keysym on the same key, such as `backspace' and `tab'.
 elements of this vector may also be keysyms if they have no modifiers.
 That is, the `A' keystroke is represented by all of these forms:
 
-       A       ?A      65      (A)     (?A)    (65)
-       [A]     [?A]    [65]    [(A)]   [(?A)]  [(65)]
+             A       ?A      65      (A)     (?A)    (65)
+             [A]     [?A]    [65]    [(A)]   [(?A)]  [(65)]
 
    the `control-a' keystroke is represented by these forms:
 
-       (control A)     (control ?A)    (control 65)
-       [(control A)]   [(control ?A)]  [(control 65)]
+             (control A)     (control ?A)    (control 65)
+             [(control A)]   [(control ?A)]  [(control 65)]
 
    the key sequence `control-c control-a' is represented by these forms:
 
-       [(control c) (control a)]       [(control ?c) (control ?a)]
-       [(control 99) (control 65)]     etc.
+             [(control c) (control a)]       [(control ?c) (control ?a)]
+             [(control 99) (control 65)]     etc.
 
    Mouse button clicks work just like keypresses: `(control button1)'
 means pressing the left mouse button while holding down the control
@@ -787,21 +838,21 @@ would represent two key sequences: `(control h)' and `backspace'.
 Binding a command to this will actually bind both of those key
 sequences.  Likewise for the following pairs:
 
-               control h       backspace
-               control i       tab
-               control m       return
-               control j       linefeed
-               control [       escape
-               control @       control space
+                     control h       backspace
+                     control i       tab
+                     control m       return
+                     control j       linefeed
+                     control [       escape
+                     control @      control space
 
    After binding a command to two key sequences with a form like
 
-       (define-key global-map "\^X\^I" 'command-1)
+             (define-key global-map "\^X\^I" 'command-1)
 
 it is possible to redefine only one of those sequences like so:
 
-       (define-key global-map [(control x) (control i)] 'command-2)
-       (define-key global-map [(control x) tab] 'command-3)
+             (define-key global-map [(control x) (control i)] 'command-2)
+             (define-key global-map [(control x) tab] 'command-3)
 
    Of course, all of this applies only when running under a window
 system.  If you're talking to XEmacs through a TTY connection, you
@@ -1021,20 +1072,20 @@ completion and exit commands.  *Note Intro to Minibuffers::.
           => #<keymap lisp-interaction-mode-map 5 entries 0x558>
           (describe-bindings-internal (current-local-map))
           =>  ; Inserted into the buffer:
-          backspace    backward-delete-char-untabify
-          linefeed     eval-print-last-sexp
-          delete               delete-char
-          C-j          eval-print-last-sexp
-          C-x          << Prefix Command >>
-          M-tab                lisp-complete-symbol
-          M-;          lisp-indent-for-comment
-          M-C-i                lisp-complete-symbol
-          M-C-q                indent-sexp
-          M-C-x                eval-defun
-          Alt-backspace        backward-kill-sexp
-          Alt-delete   kill-sexp
+          backspace       backward-delete-char-untabify
+          linefeed        eval-print-last-sexp
+          delete          delete-char
+          C-j             eval-print-last-sexp
+          C-x             << Prefix Command >>
+          M-tab           lisp-complete-symbol
+          M-;             lisp-indent-for-comment
+          M-C-i           lisp-complete-symbol
+          M-C-q           indent-sexp
+          M-C-x           eval-defun
+          Alt-backspace   backward-kill-sexp
+          Alt-delete      kill-sexp
           
-          C-x x                edebug-defun
+          C-x x           edebug-defun
 
  - Function: current-minor-mode-maps
      This function returns a list of the keymaps of currently enabled