comparison src/window.c @ 52836:a832ae359532

(Fset_window_margins): Allow only integers as args. (syms_of_window) <special-display-buffer-names, special-display-regexps>: Doc fixes.
author Richard M. Stallman <rms@gnu.org>
date Mon, 13 Oct 2003 18:44:22 +0000
parents 90ee1e68a85f
children ac400ff02a1c
comparison
equal deleted inserted replaced
52835:65c6d4b5131e 52836:a832ae359532
5854 (window, left, right) 5854 (window, left, right)
5855 Lisp_Object window, left, right; 5855 Lisp_Object window, left, right;
5856 { 5856 {
5857 struct window *w = decode_window (window); 5857 struct window *w = decode_window (window);
5858 5858
5859 /* TODO: It doesn't make sense to use FLOATs here, since
5860 the rest of the code assumes they are integers.
5861 So don't allow floats! ++KFS */
5862
5863 if (!NILP (left)) 5859 if (!NILP (left))
5864 CHECK_NUMBER_OR_FLOAT (left); 5860 CHECK_NUMBER (left);
5865 if (!NILP (right)) 5861 if (!NILP (right))
5866 CHECK_NUMBER_OR_FLOAT (right); 5862 CHECK_NUMBER (right);
5867 5863
5868 /* Check widths < 0 and translate a zero width to nil. 5864 /* Check widths < 0 and translate a zero width to nil.
5869 Margins that are too wide have to be checked elsewhere. */ 5865 Margins that are too wide have to be checked elsewhere. */
5870 if ((INTEGERP (left) && XINT (left) < 0) 5866 if ((INTEGERP (left) && XINT (left) < 0)
5871 || (FLOATP (left) && XFLOAT_DATA (left) <= 0)) 5867 || (FLOATP (left) && XFLOAT_DATA (left) <= 0))
6445 In the first case, FRAME-PARAMETERS are used to create the frame. 6441 In the first case, FRAME-PARAMETERS are used to create the frame.
6446 In the latter case, FUNCTION is called with BUFFER as the first argument, 6442 In the latter case, FUNCTION is called with BUFFER as the first argument,
6447 followed by OTHER-ARGS--it can display BUFFER in any way it likes. 6443 followed by OTHER-ARGS--it can display BUFFER in any way it likes.
6448 All this is done by the function found in `special-display-function'. 6444 All this is done by the function found in `special-display-function'.
6449 6445
6446 If the specified frame parameters include (same-buffer . t), the
6447 buffer is displayed in the currently selected window. Otherwise, if
6448 they include (same-frame . t), the buffer is displayed in a new window
6449 in the currently selected frame.
6450
6450 If this variable appears \"not to work\", because you add a name to it 6451 If this variable appears \"not to work\", because you add a name to it
6451 but that buffer still appears in the selected window, look at the 6452 but that buffer still appears in the selected window, look at the
6452 values of `same-window-buffer-names' and `same-window-regexps'. 6453 values of `same-window-buffer-names' and `same-window-regexps'.
6453 Those variables take precedence over this one. */); 6454 Those variables take precedence over this one. */);
6454 Vspecial_display_buffer_names = Qnil; 6455 Vspecial_display_buffer_names = Qnil;
6464 (REGEXP FRAME-PARAMETERS...) (REGEXP FUNCTION OTHER-ARGS...) 6465 (REGEXP FRAME-PARAMETERS...) (REGEXP FUNCTION OTHER-ARGS...)
6465 In the first case, FRAME-PARAMETERS are used to create the frame. 6466 In the first case, FRAME-PARAMETERS are used to create the frame.
6466 In the latter case, FUNCTION is called with the buffer as first argument, 6467 In the latter case, FUNCTION is called with the buffer as first argument,
6467 followed by OTHER-ARGS--it can display the buffer in any way it likes. 6468 followed by OTHER-ARGS--it can display the buffer in any way it likes.
6468 All this is done by the function found in `special-display-function'. 6469 All this is done by the function found in `special-display-function'.
6470
6471 If the specified frame parameters include (same-buffer . t), the
6472 buffer is displayed in the currently selected window. Otherwise, if
6473 they include (same-frame . t), the buffer is displayed in a new window
6474 in the currently selected frame.
6469 6475
6470 If this variable appears \"not to work\", because you add a regexp to it 6476 If this variable appears \"not to work\", because you add a regexp to it
6471 but the matching buffers still appear in the selected window, look at the 6477 but the matching buffers still appear in the selected window, look at the
6472 values of `same-window-buffer-names' and `same-window-regexps'. 6478 values of `same-window-buffer-names' and `same-window-regexps'.
6473 Those variables take precedence over this one. */); 6479 Those variables take precedence over this one. */);