aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Naggum1996-01-09 00:34:12 +0000
committerErik Naggum1996-01-09 00:34:12 +0000
commit413430c5d87bd29a804c7976c02f1bd0505bc4d2 (patch)
tree0adf394d8dce84af31e2f2f50c90e4502050bb94
parent1f5e848a11bd55292ddc60a967f229fbda878235 (diff)
downloademacs-413430c5d87bd29a804c7976c02f1bd0505bc4d2.tar.gz
emacs-413430c5d87bd29a804c7976c02f1bd0505bc4d2.zip
(Fwindowp, Fwindow_live_p, Fother_window, Fenlarge_window, Fshrink_window,
Fscroll_up, Fscroll_down, Fscroll_other_window, Fscroll_left, Fscroll_right, Frecenter, Fwindow_configuration_p): Harmonize arguments with documentation.
-rw-r--r--src/window.c100
1 files changed, 50 insertions, 50 deletions
diff --git a/src/window.c b/src/window.c
index 099730f05c5..59ab7c53a9b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -110,19 +110,19 @@ static int sequence_number;
110#define min(a, b) ((a) < (b) ? (a) : (b)) 110#define min(a, b) ((a) < (b) ? (a) : (b))
111 111
112DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, 112DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0,
113 "Returns t if OBJ is a window.") 113 "Returns t if OBJECT is a window.")
114 (obj) 114 (object)
115 Lisp_Object obj; 115 Lisp_Object object;
116{ 116{
117 return WINDOWP (obj) ? Qt : Qnil; 117 return WINDOWP (object) ? Qt : Qnil;
118} 118}
119 119
120DEFUN ("window-live-p", Fwindow_live_p, Swindow_live_p, 1, 1, 0, 120DEFUN ("window-live-p", Fwindow_live_p, Swindow_live_p, 1, 1, 0,
121 "Returns t if OBJ is a window which is currently visible.") 121 "Returns t if OBJECT is a window which is currently visible.")
122 (obj) 122 (object)
123 Lisp_Object obj; 123 Lisp_Object object;
124{ 124{
125 return (WINDOWP (obj) && ! NILP (XWINDOW (obj)->buffer) ? Qt : Qnil); 125 return (WINDOWP (object) && ! NILP (XWINDOW (object)->buffer) ? Qt : Qnil);
126} 126}
127 127
128Lisp_Object 128Lisp_Object
@@ -1205,15 +1205,15 @@ All windows on current frame are arranged in a cyclic order.\n\
1205This command selects the window ARG steps away in that order.\n\ 1205This command selects the window ARG steps away in that order.\n\
1206A negative ARG moves in the opposite order. If the optional second\n\ 1206A negative ARG moves in the opposite order. If the optional second\n\
1207argument ALL_FRAMES is non-nil, cycle through all frames.") 1207argument ALL_FRAMES is non-nil, cycle through all frames.")
1208 (n, all_frames) 1208 (arg, all_frames)
1209 register Lisp_Object n, all_frames; 1209 register Lisp_Object arg, all_frames;
1210{ 1210{
1211 register int i; 1211 register int i;
1212 register Lisp_Object w; 1212 register Lisp_Object w;
1213 1213
1214 CHECK_NUMBER (n, 0); 1214 CHECK_NUMBER (arg, 0);
1215 w = selected_window; 1215 w = selected_window;
1216 i = XINT (n); 1216 i = XINT (arg);
1217 1217
1218 while (i > 0) 1218 while (i > 0)
1219 { 1219 {
@@ -2399,22 +2399,22 @@ and put SIZE columns in the first of the pair.")
2399DEFUN ("enlarge-window", Fenlarge_window, Senlarge_window, 1, 2, "p", 2399DEFUN ("enlarge-window", Fenlarge_window, Senlarge_window, 1, 2, "p",
2400 "Make current window ARG lines bigger.\n\ 2400 "Make current window ARG lines bigger.\n\
2401From program, optional second arg non-nil means grow sideways ARG columns.") 2401From program, optional second arg non-nil means grow sideways ARG columns.")
2402 (n, side) 2402 (arg, side)
2403 register Lisp_Object n, side; 2403 register Lisp_Object arg, side;
2404{ 2404{
2405 CHECK_NUMBER (n, 0); 2405 CHECK_NUMBER (arg, 0);
2406 change_window_height (XINT (n), !NILP (side)); 2406 change_window_height (XINT (arg), !NILP (side));
2407 return Qnil; 2407 return Qnil;
2408} 2408}
2409 2409
2410DEFUN ("shrink-window", Fshrink_window, Sshrink_window, 1, 2, "p", 2410DEFUN ("shrink-window", Fshrink_window, Sshrink_window, 1, 2, "p",
2411 "Make current window ARG lines smaller.\n\ 2411 "Make current window ARG lines smaller.\n\
2412From program, optional second arg non-nil means shrink sideways ARG columns.") 2412From program, optional second arg non-nil means shrink sideways arg columns.")
2413 (n, side) 2413 (arg, side)
2414 register Lisp_Object n, side; 2414 register Lisp_Object arg, side;
2415{ 2415{
2416 CHECK_NUMBER (n, 0); 2416 CHECK_NUMBER (arg, 0);
2417 change_window_height (-XINT (n), !NILP (side)); 2417 change_window_height (-XINT (arg), !NILP (side));
2418 return Qnil; 2418 return Qnil;
2419} 2419}
2420 2420
@@ -2724,10 +2724,10 @@ DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P",
2724A near full screen is `next-screen-context-lines' less than a full screen.\n\ 2724A near full screen is `next-screen-context-lines' less than a full screen.\n\
2725Negative ARG means scroll downward.\n\ 2725Negative ARG means scroll downward.\n\
2726When calling from a program, supply a number as argument or nil.") 2726When calling from a program, supply a number as argument or nil.")
2727 (n) 2727 (arg)
2728 Lisp_Object n; 2728 Lisp_Object arg;
2729{ 2729{
2730 scroll_command (n, 1); 2730 scroll_command (arg, 1);
2731 return Qnil; 2731 return Qnil;
2732} 2732}
2733 2733
@@ -2736,10 +2736,10 @@ DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P",
2736A near full screen is `next-screen-context-lines' less than a full screen.\n\ 2736A near full screen is `next-screen-context-lines' less than a full screen.\n\
2737Negative ARG means scroll upward.\n\ 2737Negative ARG means scroll upward.\n\
2738When calling from a program, supply a number as argument or nil.") 2738When calling from a program, supply a number as argument or nil.")
2739 (n) 2739 (arg)
2740 Lisp_Object n; 2740 Lisp_Object arg;
2741{ 2741{
2742 scroll_command (n, -1); 2742 scroll_command (arg, -1);
2743 return Qnil; 2743 return Qnil;
2744} 2744}
2745 2745
@@ -2796,8 +2796,8 @@ If in the minibuffer, `minibuffer-scroll-window' if non-nil\n\
2796specifies the window to scroll.\n\ 2796specifies the window to scroll.\n\
2797If `other-window-scroll-buffer' is non-nil, scroll the window\n\ 2797If `other-window-scroll-buffer' is non-nil, scroll the window\n\
2798showing that buffer, popping the buffer up if necessary.") 2798showing that buffer, popping the buffer up if necessary.")
2799 (n) 2799 (arg)
2800 register Lisp_Object n; 2800 register Lisp_Object arg;
2801{ 2801{
2802 register Lisp_Object window; 2802 register Lisp_Object window;
2803 register int defalt; 2803 register int defalt;
@@ -2816,16 +2816,16 @@ showing that buffer, popping the buffer up if necessary.")
2816 Fset_buffer (w->buffer); 2816 Fset_buffer (w->buffer);
2817 SET_PT (marker_position (w->pointm)); 2817 SET_PT (marker_position (w->pointm));
2818 2818
2819 if (NILP (n)) 2819 if (NILP (arg))
2820 window_scroll (window, defalt, 1); 2820 window_scroll (window, defalt, 1);
2821 else if (EQ (n, Qminus)) 2821 else if (EQ (arg, Qminus))
2822 window_scroll (window, -defalt, 1); 2822 window_scroll (window, -defalt, 1);
2823 else 2823 else
2824 { 2824 {
2825 if (CONSP (n)) 2825 if (CONSP (arg))
2826 n = Fcar (n); 2826 arg = Fcar (arg);
2827 CHECK_NUMBER (n, 0); 2827 CHECK_NUMBER (arg, 0);
2828 window_scroll (window, XINT (n), 1); 2828 window_scroll (window, XINT (arg), 1);
2829 } 2829 }
2830 2830
2831 Fset_marker (w->pointm, make_number (PT), Qnil); 2831 Fset_marker (w->pointm, make_number (PT), Qnil);
@@ -2873,36 +2873,36 @@ DEFUN ("recenter", Frecenter, Srecenter, 0, 1, "P",
2873 "Center point in window and redisplay frame. With ARG, put point on line ARG.\n\ 2873 "Center point in window and redisplay frame. With ARG, put point on line ARG.\n\
2874The desired position of point is always relative to the current window.\n\ 2874The desired position of point is always relative to the current window.\n\
2875Just C-u as prefix means put point in the center of the window.\n\ 2875Just C-u as prefix means put point in the center of the window.\n\
2876No arg (i.e., it is nil) erases the entire frame and then\n\ 2876If ARG is omitted or nil, erases the entire frame and then\n\
2877redraws with point in the center of the current window.") 2877redraws with point in the center of the current window.")
2878 (n) 2878 (arg)
2879 register Lisp_Object n; 2879 register Lisp_Object arg;
2880{ 2880{
2881 register struct window *w = XWINDOW (selected_window); 2881 register struct window *w = XWINDOW (selected_window);
2882 register int ht = window_internal_height (w); 2882 register int ht = window_internal_height (w);
2883 struct position pos; 2883 struct position pos;
2884 2884
2885 if (NILP (n)) 2885 if (NILP (arg))
2886 { 2886 {
2887 extern int frame_garbaged; 2887 extern int frame_garbaged;
2888 2888
2889 SET_FRAME_GARBAGED (XFRAME (WINDOW_FRAME (w))); 2889 SET_FRAME_GARBAGED (XFRAME (WINDOW_FRAME (w)));
2890 XSETFASTINT (n, ht / 2); 2890 XSETFASTINT (arg, ht / 2);
2891 } 2891 }
2892 else if (CONSP (n)) /* Just C-u. */ 2892 else if (CONSP (arg)) /* Just C-u. */
2893 { 2893 {
2894 XSETFASTINT (n, ht / 2); 2894 XSETFASTINT (arg, ht / 2);
2895 } 2895 }
2896 else 2896 else
2897 { 2897 {
2898 n = Fprefix_numeric_value (n); 2898 arg = Fprefix_numeric_value (arg);
2899 CHECK_NUMBER (n, 0); 2899 CHECK_NUMBER (arg, 0);
2900 } 2900 }
2901 2901
2902 if (XINT (n) < 0) 2902 if (XINT (arg) < 0)
2903 XSETINT (n, XINT (n) + ht); 2903 XSETINT (arg, XINT (arg) + ht);
2904 2904
2905 pos = *vmotion (point, - XINT (n), w); 2905 pos = *vmotion (point, - XINT (arg), w);
2906 2906
2907 Fset_marker (w->start, make_number (pos.bufpos), w->buffer); 2907 Fset_marker (w->start, make_number (pos.bufpos), w->buffer);
2908 w->start_at_line_beg = ((pos.bufpos == BEGV 2908 w->start_at_line_beg = ((pos.bufpos == BEGV
@@ -2990,10 +2990,10 @@ struct saved_window
2990 2990
2991DEFUN ("window-configuration-p", Fwindow_configuration_p, Swindow_configuration_p, 1, 1, 0, 2991DEFUN ("window-configuration-p", Fwindow_configuration_p, Swindow_configuration_p, 1, 1, 0,
2992 "T if OBJECT is a window-configuration object.") 2992 "T if OBJECT is a window-configuration object.")
2993 (obj) 2993 (object)
2994 Lisp_Object obj; 2994 Lisp_Object object;
2995{ 2995{
2996 if (WINDOW_CONFIGURATIONP (obj)) 2996 if (WINDOW_CONFIGURATIONP (object))
2997 return Qt; 2997 return Qt;
2998 return Qnil; 2998 return Qnil;
2999} 2999}