(construct_menu_click, construct_mouse_click):
[bpt/emacs.git] / src / window.c
index 78a8530..b253f7d 100644 (file)
@@ -264,10 +264,7 @@ use  (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))).")
   (window)
      Lisp_Object window;
 {
-  register struct window *w = decode_window (window);
-  register int width = XFASTINT (w->width);
-
-  return make_number (window_internal_width (w));
+  return make_number (window_internal_width (decode_window (window)));
 }
 
 DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
@@ -615,8 +612,9 @@ static
 unshow_buffer (w)
      register struct window *w;
 {
-  Lisp_Object buf = w->buffer;
+  Lisp_Object buf;
 
+  buf = w->buffer;
   if (XBUFFER (buf) != XMARKER (w->pointm)->buffer)
     abort ();
 
@@ -1219,7 +1217,8 @@ window_loop (type, obj, mini, frames)
                   on the frame, find a new buffer to display there.  */
                if (NILP (XWINDOW (w)->parent))
                  {
-                   Lisp_Object new_buffer = Fother_buffer (obj, Qnil);
+                   Lisp_Object new_buffer;
+                   new_buffer = Fother_buffer (obj, Qnil);
                    if (NILP (new_buffer))
                      new_buffer
                        = Fget_buffer_create (build_string ("*scratch*"));
@@ -1252,7 +1251,8 @@ window_loop (type, obj, mini, frames)
            if (EQ (XWINDOW (w)->buffer, obj))
              {
                /* Find another buffer to show in this window.  */
-               Lisp_Object another_buffer = Fother_buffer (obj, Qnil);
+               Lisp_Object another_buffer;
+               another_buffer = Fother_buffer (obj, Qnil);
                if (NILP (another_buffer))
                  another_buffer
                    = Fget_buffer_create (build_string ("*scratch*"));
@@ -1735,8 +1735,9 @@ Returns the window displaying BUFFER.")
 #endif
       )
     {
-      Lisp_Object frames = Qnil;
-      
+      Lisp_Object frames;
+
+      frames = Qnil;      
 #ifdef MULTI_FRAME
       if (FRAME_MINIBUF_ONLY_P (selected_frame))
        XSET (frames, Lisp_Frame, last_nonminibuf_frame);
@@ -2178,7 +2179,7 @@ window_scroll (window, n, noerror)
 
   if (NILP (tem))
     {
-      Fvertical_motion (make_number (- ht / 2), window);
+      Fvertical_motion (make_number (- (ht / 2)), window);
       XFASTINT (tem) = point;
       Fset_marker (w->start, tem, w->buffer);
       w->force_start = Qt;
@@ -2264,6 +2265,7 @@ scroll_command (n, direction)
 DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P",
   "Scroll text of current window upward ARG lines; or near full screen if no ARG.\n\
 A near full screen is `next-screen-context-lines' less than a full screen.\n\
+Negative ARG means scroll downward.\n\
 When calling from a program, supply a number as argument or nil.")
   (n)
      Lisp_Object n;
@@ -2275,6 +2277,7 @@ When calling from a program, supply a number as argument or nil.")
 DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P",
   "Scroll text of current window downward ARG lines; or near full screen if no ARG.\n\
 A near full screen is `next-screen-context-lines' less than a full screen.\n\
+Negative ARG means scroll upward.\n\
 When calling from a program, supply a number as argument or nil.")
   (n)
      Lisp_Object n;
@@ -2286,7 +2289,7 @@ When calling from a program, supply a number as argument or nil.")
 DEFUN ("scroll-other-window", Fscroll_other_window, Sscroll_other_window, 0, 1, "P",
   "Scroll next window upward ARG lines; or near full screen if no ARG.\n\
 The next window is the one below the current one; or the one at the top\n\
-if the current one is at the bottom.\n\
+if the current one is at the bottom.  Negative ARG means scroll downward.\n\
 When calling from a program, supply a number as argument or nil.\n\
 \n\
 If in the minibuffer, `minibuffer-scroll-window' if non-nil\n\
@@ -2467,7 +2470,7 @@ negative means relative to bottom of window.")
   XSET (window, Lisp_Window, w);
   if (start < BEGV || start > ZV)
     {
-      Fvertical_motion (make_number (- height / 2), window);
+      Fvertical_motion (make_number (- (height / 2)), window);
       Fset_marker (w->start, make_number (point), w->buffer);
       w->start_at_line_beg = Fbolp ();
       w->force_start = Qt;