Mercurial > emacs
comparison src/dispnew.c @ 39914:91951fb5b9e5
Put doc strings in comments.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sun, 14 Oct 2001 10:36:01 +0000 |
parents | 5f60884970a8 |
children | 5b721ecd0f39 |
comparison
equal
deleted
inserted
replaced
39913:5170ea31a07f | 39914:91951fb5b9e5 |
---|---|
16 | 16 |
17 You should have received a copy of the GNU General Public License | 17 You should have received a copy of the GNU General Public License |
18 along with GNU Emacs; see the file COPYING. If not, write to | 18 along with GNU Emacs; see the file COPYING. If not, write to |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 Boston, MA 02111-1307, USA. */ | 20 Boston, MA 02111-1307, USA. */ |
21 | |
22 #define DOC_STRINGS_IN_COMMENTS | |
21 | 23 |
22 #include <config.h> | 24 #include <config.h> |
23 #include <signal.h> | 25 #include <signal.h> |
24 #include <stdio.h> | 26 #include <stdio.h> |
25 #include <ctype.h> | 27 #include <ctype.h> |
408 } | 410 } |
409 | 411 |
410 | 412 |
411 DEFUN ("dump-redisplay-history", Fdump_redisplay_history, | 413 DEFUN ("dump-redisplay-history", Fdump_redisplay_history, |
412 Sdump_redisplay_history, 0, 0, "", | 414 Sdump_redisplay_history, 0, 0, "", |
413 "Dump redisplay history to stderr.") | 415 /* Dump redisplay history to stderr. */ |
414 () | 416 ()) |
415 { | 417 { |
416 int i; | 418 int i; |
417 | 419 |
418 for (i = history_idx - 1; i != history_idx; --i) | 420 for (i = history_idx - 1; i != history_idx; --i) |
419 { | 421 { |
3303 /********************************************************************** | 3305 /********************************************************************** |
3304 Redrawing Frames | 3306 Redrawing Frames |
3305 **********************************************************************/ | 3307 **********************************************************************/ |
3306 | 3308 |
3307 DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, | 3309 DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, |
3308 "Clear frame FRAME and output again what is supposed to appear on it.") | 3310 /* Clear frame FRAME and output again what is supposed to appear on it. */ |
3309 (frame) | 3311 (frame)) |
3310 Lisp_Object frame; | 3312 Lisp_Object frame; |
3311 { | 3313 { |
3312 struct frame *f; | 3314 struct frame *f; |
3313 | 3315 |
3314 CHECK_LIVE_FRAME (frame, 0); | 3316 CHECK_LIVE_FRAME (frame, 0); |
3349 Fredraw_frame (frame); | 3351 Fredraw_frame (frame); |
3350 } | 3352 } |
3351 | 3353 |
3352 | 3354 |
3353 DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", | 3355 DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", |
3354 "Clear and redisplay all visible frames.") | 3356 /* Clear and redisplay all visible frames. */ |
3355 () | 3357 ()) |
3356 { | 3358 { |
3357 Lisp_Object tail, frame; | 3359 Lisp_Object tail, frame; |
3358 | 3360 |
3359 FOR_EACH_FRAME (tail, frame) | 3361 FOR_EACH_FRAME (tail, frame) |
3360 if (FRAME_VISIBLE_P (XFRAME (frame))) | 3362 if (FRAME_VISIBLE_P (XFRAME (frame))) |
6038 /*********************************************************************** | 6040 /*********************************************************************** |
6039 Terminal Related Lisp Functions | 6041 Terminal Related Lisp Functions |
6040 ***********************************************************************/ | 6042 ***********************************************************************/ |
6041 | 6043 |
6042 DEFUN ("open-termscript", Fopen_termscript, Sopen_termscript, | 6044 DEFUN ("open-termscript", Fopen_termscript, Sopen_termscript, |
6043 1, 1, "FOpen termscript file: ", | 6045 1, 1, "FOpen termscript file: ", |
6044 "Start writing all terminal output to FILE as well as the terminal.\n\ | 6046 /* Start writing all terminal output to FILE as well as the terminal. |
6045 FILE = nil means just close any termscript file currently open.") | 6047 FILE = nil means just close any termscript file currently open. */ |
6046 (file) | 6048 (file)) |
6047 Lisp_Object file; | 6049 Lisp_Object file; |
6048 { | 6050 { |
6049 if (termscript != 0) fclose (termscript); | 6051 if (termscript != 0) fclose (termscript); |
6050 termscript = 0; | 6052 termscript = 0; |
6051 | 6053 |
6059 return Qnil; | 6061 return Qnil; |
6060 } | 6062 } |
6061 | 6063 |
6062 | 6064 |
6063 DEFUN ("send-string-to-terminal", Fsend_string_to_terminal, | 6065 DEFUN ("send-string-to-terminal", Fsend_string_to_terminal, |
6064 Ssend_string_to_terminal, 1, 1, 0, | 6066 Ssend_string_to_terminal, 1, 1, 0, |
6065 "Send STRING to the terminal without alteration.\n\ | 6067 /* Send STRING to the terminal without alteration. |
6066 Control characters in STRING will have terminal-dependent effects.") | 6068 Control characters in STRING will have terminal-dependent effects. */ |
6067 (string) | 6069 (string)) |
6068 Lisp_Object string; | 6070 Lisp_Object string; |
6069 { | 6071 { |
6070 /* ??? Perhaps we should do something special for multibyte strings here. */ | 6072 /* ??? Perhaps we should do something special for multibyte strings here. */ |
6071 CHECK_STRING (string, 0); | 6073 CHECK_STRING (string, 0); |
6072 fwrite (XSTRING (string)->data, 1, STRING_BYTES (XSTRING (string)), stdout); | 6074 fwrite (XSTRING (string)->data, 1, STRING_BYTES (XSTRING (string)), stdout); |
6080 return Qnil; | 6082 return Qnil; |
6081 } | 6083 } |
6082 | 6084 |
6083 | 6085 |
6084 DEFUN ("ding", Fding, Sding, 0, 1, 0, | 6086 DEFUN ("ding", Fding, Sding, 0, 1, 0, |
6085 "Beep, or flash the screen.\n\ | 6087 /* Beep, or flash the screen. |
6086 Also, unless an argument is given,\n\ | 6088 Also, unless an argument is given, |
6087 terminate any keyboard macro currently executing.") | 6089 terminate any keyboard macro currently executing. */ |
6088 (arg) | 6090 (arg)) |
6089 Lisp_Object arg; | 6091 Lisp_Object arg; |
6090 { | 6092 { |
6091 if (!NILP (arg)) | 6093 if (!NILP (arg)) |
6092 { | 6094 { |
6093 if (noninteractive) | 6095 if (noninteractive) |
6119 /*********************************************************************** | 6121 /*********************************************************************** |
6120 Sleeping, Waiting | 6122 Sleeping, Waiting |
6121 ***********************************************************************/ | 6123 ***********************************************************************/ |
6122 | 6124 |
6123 DEFUN ("sleep-for", Fsleep_for, Ssleep_for, 1, 2, 0, | 6125 DEFUN ("sleep-for", Fsleep_for, Ssleep_for, 1, 2, 0, |
6124 "Pause, without updating display, for SECONDS seconds.\n\ | 6126 /* Pause, without updating display, for SECONDS seconds. |
6125 SECONDS may be a floating-point value, meaning that you can wait for a\n\ | 6127 SECONDS may be a floating-point value, meaning that you can wait for a |
6126 fraction of a second. Optional second arg MILLISECONDS specifies an\n\ | 6128 fraction of a second. Optional second arg MILLISECONDS specifies an |
6127 additional wait period, in milliseconds; this may be useful if your\n\ | 6129 additional wait period, in milliseconds; this may be useful if your |
6128 Emacs was built without floating point support.\n\ | 6130 Emacs was built without floating point support. |
6129 \(Not all operating systems support waiting for a fraction of a second.)") | 6131 \(Not all operating systems support waiting for a fraction of a second. */ |
6130 (seconds, milliseconds) | 6132 (seconds, milliseconds)) |
6131 Lisp_Object seconds, milliseconds; | 6133 Lisp_Object seconds, milliseconds; |
6132 { | 6134 { |
6133 int sec, usec; | 6135 int sec, usec; |
6134 | 6136 |
6135 if (NILP (milliseconds)) | 6137 if (NILP (milliseconds)) |
6242 return detect_input_pending () ? Qnil : Qt; | 6244 return detect_input_pending () ? Qnil : Qt; |
6243 } | 6245 } |
6244 | 6246 |
6245 | 6247 |
6246 DEFUN ("sit-for", Fsit_for, Ssit_for, 1, 3, 0, | 6248 DEFUN ("sit-for", Fsit_for, Ssit_for, 1, 3, 0, |
6247 "Perform redisplay, then wait for SECONDS seconds or until input is available.\n\ | 6249 /* Perform redisplay, then wait for SECONDS seconds or until input is available. |
6248 SECONDS may be a floating-point value, meaning that you can wait for a\n\ | 6250 SECONDS may be a floating-point value, meaning that you can wait for a |
6249 fraction of a second. Optional second arg MILLISECONDS specifies an\n\ | 6251 fraction of a second. Optional second arg MILLISECONDS specifies an |
6250 additional wait period, in milliseconds; this may be useful if your\n\ | 6252 additional wait period, in milliseconds; this may be useful if your |
6251 Emacs was built without floating point support.\n\ | 6253 Emacs was built without floating point support. |
6252 \(Not all operating systems support waiting for a fraction of a second.)\n\ | 6254 \(Not all operating systems support waiting for a fraction of a second.) |
6253 Optional third arg NODISP non-nil means don't redisplay, just wait for input.\n\ | 6255 Optional third arg NODISP non-nil means don't redisplay, just wait for input. |
6254 Redisplay is preempted as always if input arrives, and does not happen\n\ | 6256 Redisplay is preempted as always if input arrives, and does not happen |
6255 if input is available before it starts.\n\ | 6257 if input is available before it starts. |
6256 Value is t if waited the full time with no input arriving.") | 6258 Value is t if waited the full time with no input arriving. */ |
6257 (seconds, milliseconds, nodisp) | 6259 (seconds, milliseconds, nodisp)) |
6258 Lisp_Object seconds, milliseconds, nodisp; | 6260 Lisp_Object seconds, milliseconds, nodisp; |
6259 { | 6261 { |
6260 int sec, usec; | 6262 int sec, usec; |
6261 | 6263 |
6262 if (NILP (milliseconds)) | 6264 if (NILP (milliseconds)) |
6292 | 6294 |
6293 static Lisp_Object frame_and_buffer_state; | 6295 static Lisp_Object frame_and_buffer_state; |
6294 | 6296 |
6295 | 6297 |
6296 DEFUN ("frame-or-buffer-changed-p", Fframe_or_buffer_changed_p, | 6298 DEFUN ("frame-or-buffer-changed-p", Fframe_or_buffer_changed_p, |
6297 Sframe_or_buffer_changed_p, 0, 0, 0, | 6299 Sframe_or_buffer_changed_p, 0, 0, 0, |
6298 "Return non-nil if the frame and buffer state appears to have changed.\n\ | 6300 /* Return non-nil if the frame and buffer state appears to have changed. |
6299 The state variable is an internal vector containing all frames and buffers,\n\ | 6301 The state variable is an internal vector containing all frames and buffers, |
6300 aside from buffers whose names start with space,\n\ | 6302 aside from buffers whose names start with space, |
6301 along with the buffers' read-only and modified flags, which allows a fast\n\ | 6303 along with the buffers' read-only and modified flags, which allows a fast |
6302 check to see whether the menu bars might need to be recomputed.\n\ | 6304 check to see whether the menu bars might need to be recomputed. |
6303 If this function returns non-nil, it updates the internal vector to reflect\n\ | 6305 If this function returns non-nil, it updates the internal vector to reflect |
6304 the current state.\n") | 6306 the current state. */ |
6305 () | 6307 ()) |
6306 { | 6308 { |
6307 Lisp_Object tail, frame, buf; | 6309 Lisp_Object tail, frame, buf; |
6308 Lisp_Object *vecp; | 6310 Lisp_Object *vecp; |
6309 int n; | 6311 int n; |
6310 | 6312 |
6565 Blinking cursor | 6567 Blinking cursor |
6566 ***********************************************************************/ | 6568 ***********************************************************************/ |
6567 | 6569 |
6568 DEFUN ("internal-show-cursor", Finternal_show_cursor, | 6570 DEFUN ("internal-show-cursor", Finternal_show_cursor, |
6569 Sinternal_show_cursor, 2, 2, 0, | 6571 Sinternal_show_cursor, 2, 2, 0, |
6570 "Set the cursor-visibility flag of WINDOW to SHOW.\n\ | 6572 /* Set the cursor-visibility flag of WINDOW to SHOW. |
6571 WINDOW nil means use the selected window. SHOW non-nil means\n\ | 6573 WINDOW nil means use the selected window. SHOW non-nil means |
6572 show a cursor in WINDOW in the next redisplay. SHOW nil means\n\ | 6574 show a cursor in WINDOW in the next redisplay. SHOW nil means |
6573 don't show a cursor.") | 6575 don't show a cursor. */ |
6574 (window, show) | 6576 (window, show)) |
6575 Lisp_Object window, show; | 6577 Lisp_Object window, show; |
6576 { | 6578 { |
6577 /* Don't change cursor state while redisplaying. This could confuse | 6579 /* Don't change cursor state while redisplaying. This could confuse |
6578 output routines. */ | 6580 output routines. */ |
6579 if (!redisplaying_p) | 6581 if (!redisplaying_p) |
6590 } | 6592 } |
6591 | 6593 |
6592 | 6594 |
6593 DEFUN ("internal-show-cursor-p", Finternal_show_cursor_p, | 6595 DEFUN ("internal-show-cursor-p", Finternal_show_cursor_p, |
6594 Sinternal_show_cursor_p, 0, 1, 0, | 6596 Sinternal_show_cursor_p, 0, 1, 0, |
6595 "Value is non-nil if next redisplay will display a cursor in WINDOW.\n\ | 6597 /* Value is non-nil if next redisplay will display a cursor in WINDOW. |
6596 WINDOW nil or omitted means report on the selected window.") | 6598 WINDOW nil or omitted means report on the selected window. */ |
6597 (window) | 6599 (window)) |
6598 Lisp_Object window; | 6600 Lisp_Object window; |
6599 { | 6601 { |
6600 struct window *w; | 6602 struct window *w; |
6601 | 6603 |
6602 if (NILP (window)) | 6604 if (NILP (window)) |
6637 Qdisplay_table = intern ("display-table"); | 6639 Qdisplay_table = intern ("display-table"); |
6638 staticpro (&Qdisplay_table); | 6640 staticpro (&Qdisplay_table); |
6639 Qredisplay_dont_pause = intern ("redisplay-dont-pause"); | 6641 Qredisplay_dont_pause = intern ("redisplay-dont-pause"); |
6640 staticpro (&Qredisplay_dont_pause); | 6642 staticpro (&Qredisplay_dont_pause); |
6641 | 6643 |
6642 DEFVAR_INT ("baud-rate", &baud_rate, | 6644 DEFVAR_INT ("baud-rate", &baud_rate |
6643 "*The output baud rate of the terminal.\n\ | 6645 /* *The output baud rate of the terminal. |
6644 On most systems, changing this value will affect the amount of padding\n\ | 6646 On most systems, changing this value will affect the amount of padding |
6645 and the other strategic decisions made during redisplay."); | 6647 and the other strategic decisions made during redisplay. */); |
6646 | 6648 |
6647 DEFVAR_BOOL ("inverse-video", &inverse_video, | 6649 DEFVAR_BOOL ("inverse-video", &inverse_video |
6648 "*Non-nil means invert the entire frame display.\n\ | 6650 /* *Non-nil means invert the entire frame display. |
6649 This means everything is in inverse video which otherwise would not be."); | 6651 This means everything is in inverse video which otherwise would not be. */); |
6650 | 6652 |
6651 DEFVAR_BOOL ("visible-bell", &visible_bell, | 6653 DEFVAR_BOOL ("visible-bell", &visible_bell |
6652 "*Non-nil means try to flash the frame to represent a bell."); | 6654 /* *Non-nil means try to flash the frame to represent a bell. */); |
6653 | 6655 |
6654 DEFVAR_BOOL ("no-redraw-on-reenter", &no_redraw_on_reenter, | 6656 DEFVAR_BOOL ("no-redraw-on-reenter", &no_redraw_on_reenter |
6655 "*Non-nil means no need to redraw entire frame after suspending.\n\ | 6657 /* *Non-nil means no need to redraw entire frame after suspending. |
6656 A non-nil value is useful if the terminal can automatically preserve\n\ | 6658 A non-nil value is useful if the terminal can automatically preserve |
6657 Emacs's frame display when you reenter Emacs.\n\ | 6659 Emacs's frame display when you reenter Emacs. |
6658 It is up to you to set this variable if your terminal can do that."); | 6660 It is up to you to set this variable if your terminal can do that. */); |
6659 | 6661 |
6660 DEFVAR_LISP ("window-system", &Vwindow_system, | 6662 DEFVAR_LISP ("window-system", &Vwindow_system |
6661 "A symbol naming the window-system under which Emacs is running\n\ | 6663 /* A symbol naming the window-system under which Emacs is running |
6662 \(such as `x'), or nil if emacs is running on an ordinary terminal."); | 6664 \(such as `x'), or nil if emacs is running on an ordinary terminal. */); |
6663 | 6665 |
6664 DEFVAR_LISP ("window-system-version", &Vwindow_system_version, | 6666 DEFVAR_LISP ("window-system-version", &Vwindow_system_version |
6665 "The version number of the window system in use.\n\ | 6667 /* The version number of the window system in use. |
6666 For X windows, this is 10 or 11."); | 6668 For X windows, this is 10 or 11. */); |
6667 | 6669 |
6668 DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area, | 6670 DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area |
6669 "Non-nil means put cursor in minibuffer, at end of any message there."); | 6671 /* Non-nil means put cursor in minibuffer, at end of any message there. */); |
6670 | 6672 |
6671 DEFVAR_LISP ("glyph-table", &Vglyph_table, | 6673 DEFVAR_LISP ("glyph-table", &Vglyph_table |
6672 "Table defining how to output a glyph code to the frame.\n\ | 6674 /* Table defining how to output a glyph code to the frame. |
6673 If not nil, this is a vector indexed by glyph code to define the glyph.\n\ | 6675 If not nil, this is a vector indexed by glyph code to define the glyph. |
6674 Each element can be:\n\ | 6676 Each element can be: |
6675 integer: a glyph code which this glyph is an alias for.\n\ | 6677 integer: a glyph code which this glyph is an alias for. |
6676 string: output this glyph using that string (not impl. in X windows).\n\ | 6678 string: output this glyph using that string (not impl. in X windows). |
6677 nil: this glyph mod 524288 is the code of a character to output,\n\ | 6679 nil: this glyph mod 524288 is the code of a character to output, |
6678 and this glyph / 524288 is the face number (see `face-id') to use\n\ | 6680 and this glyph / 524288 is the face number (see `face-id') to use |
6679 while outputting it."); | 6681 while outputting it. */); |
6680 Vglyph_table = Qnil; | 6682 Vglyph_table = Qnil; |
6681 | 6683 |
6682 DEFVAR_LISP ("standard-display-table", &Vstandard_display_table, | 6684 DEFVAR_LISP ("standard-display-table", &Vstandard_display_table |
6683 "Display table to use for buffers that specify none.\n\ | 6685 /* Display table to use for buffers that specify none. |
6684 See `buffer-display-table' for more information."); | 6686 See `buffer-display-table' for more information. */); |
6685 Vstandard_display_table = Qnil; | 6687 Vstandard_display_table = Qnil; |
6686 | 6688 |
6687 DEFVAR_BOOL ("redisplay-dont-pause", &redisplay_dont_pause, | 6689 DEFVAR_BOOL ("redisplay-dont-pause", &redisplay_dont_pause |
6688 "*Non-nil means update isn't paused when input is detected."); | 6690 /* *Non-nil means update isn't paused when input is detected. */); |
6689 redisplay_dont_pause = 0; | 6691 redisplay_dont_pause = 0; |
6690 | 6692 |
6691 /* Initialize `window-system', unless init_display already decided it. */ | 6693 /* Initialize `window-system', unless init_display already decided it. */ |
6692 #ifdef CANNOT_DUMP | 6694 #ifdef CANNOT_DUMP |
6693 if (noninteractive) | 6695 if (noninteractive) |