]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs-24; up to 117689
authorGlenn Morris <rgm@gnu.org>
Sat, 8 Nov 2014 21:32:10 +0000 (13:32 -0800)
committerGlenn Morris <rgm@gnu.org>
Sat, 8 Nov 2014 21:32:10 +0000 (13:32 -0800)
1  2 
lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el
src/ChangeLog
src/nsterm.m

diff --cc lisp/ChangeLog
index ab12e064aaabb4a0ea45b310e2e0bdbf8c763b8f,c3ecb7536e0d29751e60d1a1d90d347cd8d0266a..0b0192a545dd08edafe76d1309a502a1024fc262
@@@ -1,4 -1,10 +1,10 @@@
 -2014-11-07  Michael Albinus  <michael.albinus@gmx.de>
+ 2014-11-08  Glenn Morris  <rgm@gnu.org>
+       * emacs-lisp/bytecomp.el (byte-compile-report-error):
+       Allow the argument to be a string.  Due to the vague doc,
+       it was already being used this way.
 +2014-11-08  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/tramp.el (tramp-check-cached-permissions): Include hop in
        the constructed Tramp file name.  (Bug#18943)
Simple merge
diff --cc src/ChangeLog
index e3f34e27dfcf2130e95868256a981246ebc07a31,7b595b5f9e9fcffc1fc268570f76bdf4846cee5e..82a9b24876c572a19cf9a97e6684fef2099b7f13
@@@ -1,9 -1,12 +1,11 @@@
  2014-11-08  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA.
 -      (run): Ditto.  Only use non-system event loop if OSX version is
 +      * nsterm.m (run): Only use non-system event loop if OSX version is
        exactly 10.9 (Bug#18993).
+       (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
+       needed (Bug#18757).
  
 -2014-11-07  Michael Albinus  <michael.albinus@gmx.de>
 +2014-11-08  Michael Albinus  <michael.albinus@gmx.de>
  
        * callproc.c (encode_current_directory): Support handling of file
        names prepended by "/:".  (Bug#18891)
diff --cc src/nsterm.m
index 216678357e753708bae507298cd2bbf64f916398,605baff00b257083b2d5614ca283516b3517dc84..318f14acfc8f0242446bc3e1c25ad66a21e463b3
@@@ -3756,9 -3798,11 +3756,10 @@@ ns_set_vertical_scroll_bar (struct wind
    NSRect r, v;
    struct frame *f = XFRAME (WINDOW_FRAME (window));
    EmacsView *view = FRAME_NS_VIEW (f);
 -  int window_y, window_height;
 -  int top, left, height, width, sb_width, sb_left;
    EmacsScroller *bar;
 -  BOOL fringe_extended_p;
 +  int window_y, window_height;
 +  int top, left, height, width;
+   BOOL update_p = YES;
  
    /* optimization; display engine sends WAY too many of these.. */
    if (!NILP (window->vertical_scroll_bar))
        if (FRAME_LIVE_P (f) && !NSEqualRects (oldRect, r))
          {
            if (oldRect.origin.x != r.origin.x)
 -              ns_clear_frame_area (f, sb_left, top, width, height);
 +              ns_clear_frame_area (f, left, top, width, height);
 +          [bar setFrame: r];
 +        }
 +    }
 +
 +  [bar setPosition: position portion: portion whole: whole];
 +  unblock_input ();
 +}
 +
 +
 +static void
 +ns_set_horizontal_scroll_bar (struct window *window,
 +                            int portion, int whole, int position)
 +/* --------------------------------------------------------------------------
 +      External (hook): Update or add scrollbar
 +   -------------------------------------------------------------------------- */
 +{
 +  Lisp_Object win;
 +  NSRect r, v;
 +  struct frame *f = XFRAME (WINDOW_FRAME (window));
 +  EmacsView *view = FRAME_NS_VIEW (f);
 +  EmacsScroller *bar;
 +  int top, height, left, width;
 +  int window_x, window_width;
 +  int pixel_width = WINDOW_PIXEL_WIDTH (window);
 +
 +  /* optimization; display engine sends WAY too many of these.. */
 +  if (!NILP (window->horizontal_scroll_bar))
 +    {
 +      bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar);
 +      if ([bar checkSamePosition: position portion: portion whole: whole])
 +        {
 +          if (view->scrollbarsNeedingUpdate == 0)
 +            {
 +              if (!windows_or_buffers_changed)
 +                  return;
 +            }
 +          else
 +            view->scrollbarsNeedingUpdate--;
 +        }
 +    }
 +
 +  NSTRACE (ns_set_horizontal_scroll_bar);
 +
 +  /* Get dimensions.  */
 +  window_box (window, ANY_AREA, 0, &window_x, &window_width, 0);
 +  left = window_x;
 +  width = window_width;
 +  height = WINDOW_CONFIG_SCROLL_BAR_LINES (window) * FRAME_LINE_HEIGHT (f);
 +  top = WINDOW_SCROLL_BAR_AREA_Y (window);
 +
 +  r = NSMakeRect (left, top, width, height);
 +  /* the parent view is flipped, so we need to flip y value */
 +  v = [view frame];
 +  /* ??????? PXW/scrollbars !!!!!!!!!!!!!!!!!!!! */
 +  r.origin.y = (v.size.height - r.size.height - r.origin.y);
 +
 +  XSETWINDOW (win, window);
 +  block_input ();
 +
 +  if (WINDOW_TOTAL_COLS (window) < 5)
 +    {
 +      if (!NILP (window->horizontal_scroll_bar))
 +        {
 +          bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar);
 +          [bar removeFromSuperview];
 +          wset_horizontal_scroll_bar (window, Qnil);
 +        }
 +      ns_clear_frame_area (f, left, top, width, height);
 +      unblock_input ();
 +      return;
 +    }
 +
 +  if (NILP (window->horizontal_scroll_bar))
 +    {
 +      if (width > 0 && height > 0)
 +      ns_clear_frame_area (f, left, top, width, height);
 +
 +      bar = [[EmacsScroller alloc] initFrame: r window: win];
 +      wset_horizontal_scroll_bar (window, make_save_ptr (bar));
 +    }
 +  else
 +    {
 +      NSRect oldRect;
 +      bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar);
 +      oldRect = [bar frame];
 +      r.size.width = oldRect.size.width;
 +      if (FRAME_LIVE_P (f) && !NSEqualRects (oldRect, r))
 +        {
 +          if (oldRect.origin.x != r.origin.x)
 +              ns_clear_frame_area (f, left, top, width, height);
            [bar setFrame: r];
+           update_p = YES;
          }
      }