]> code.delx.au - gnu-emacs/commitdiff
Merged in changes from CVS HEAD
authorKaroly Lorentey <lorentey@elte.hu>
Thu, 22 Jan 2004 15:37:19 +0000 (15:37 +0000)
committerKaroly Lorentey <lorentey@elte.hu>
Thu, 22 Jan 2004 15:37:19 +0000 (15:37 +0000)
Patches applied:

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-33
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-34
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-35
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-36
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-37
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-38
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-39
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-40
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-41
   Make fringe-drawing stuff compile without a window-system

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-42
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-43
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-44
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-45
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-46
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-47
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-48
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-49
   Update from CVS

 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-50
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-59

18 files changed:
1  2 
lib-src/emacsclient.c
lisp/emacs-lisp/bytecomp.el
lisp/term/x-win.el
lisp/vc-cvs.el
lisp/vc.el
src/alloc.c
src/buffer.c
src/dispextern.h
src/dispnew.c
src/fontset.c
src/keyboard.c
src/lisp.h
src/lread.c
src/macterm.c
src/process.c
src/w32term.c
src/xdisp.c
src/xterm.c

index cfbf73a20c7ba7d163fe8d650dc4ed0b132436a0,49ebada768f896874b07918e64e9aa366846856a..6cf07d35e8a76faccdab67ff5c71f61187a92098
@@@ -438,9 -358,10 +438,10 @@@ main (argc, argv
  
    {
      int sock_status = 0;
 -    int saved_errno;
 -
+     int default_sock = !socket_name;
-     if (! socket_name)
 +    int saved_errno = 0;
 +    
+     if (default_sock)
        {
        socket_name = alloca (system_name_length + 100);
        sprintf (socket_name, "/tmp/emacs%d-%s/server",
            if (pw && (pw->pw_uid != geteuid ()))
              {
                /* We're running under su, apparently. */
-               sprintf (server.sun_path, "/tmp/emacs%d-%s/server",
+               sprintf (socket_name, "/tmp/emacs%d-%s/server",
                         (int) pw->pw_uid, system_name);
+               if (strlen (socket_name) < sizeof (server.sun_path))
+                 strcpy (server.sun_path, socket_name);
+               else
+                 {
+                   fprintf (stderr, "%s: socket-name %s too long",
+                            argv[0], socket_name);
+                   exit (1);
+                 }
                sock_status = socket_status (server.sun_path);
 -              saved_errno = errno;
 +                saved_errno = errno;
              }
          }
        }
index 533e9bee3646038a0489e4729178a188875afc69,d4949f94aa6f6c51a29c9de9fa0fc4a4bff72958..24d2329b426389b70cf92781e9d385951b3f66fe
@@@ -10,7 -10,7 +10,7 @@@
  
  ;;; This version incorporates changes up to version 2.10 of the
  ;;; Zawinski-Furuseth compiler.
- (defconst byte-compile-version "$Revision: 2.139 $")
 -(defconst byte-compile-version "$Revision: 2.140 $")
++(defconst byte-compile-version "$Revision: 2.141 $")
  
  ;; This file is part of GNU Emacs.
  
index e0233d64dbdaf82d154d93629f4139af932c634f,9e37943032bfdfd112bce1f5b0b966a8b8af9b5a..c69aa01c35623c4ff7f1b7387657bf0ca65d69c4
@@@ -2330,146 -2327,145 +2330,157 @@@ order until succeed."
      (or clip-text primary-text cut-text)
      ))
  
 -\f
 -;;; Do the actual X Windows setup here; the above code just defines
 -;;; functions and variables that we use now.
 -
 -(setq command-line-args (x-handle-args command-line-args))
 -
 -;;; Make sure we have a valid resource name.
 -(or (stringp x-resource-name)
 -    (let (i)
 -      (setq x-resource-name (invocation-name))
 -
 -      ;; Change any . or * characters in x-resource-name to hyphens,
 -      ;; so as not to choke when we use it in X resource queries.
 -      (while (setq i (string-match "[.*]" x-resource-name))
 -      (aset x-resource-name i ?-))))
 -
 -(x-open-connection (or x-display-name
 -                     (setq x-display-name (getenv "DISPLAY")))
 -                 x-command-line-resources
 -                 ;; Exit Emacs with fatal error if this fails.
 -                 t)
 -
 -(setq frame-creation-function 'x-create-frame-with-faces)
 -
 -(setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
 -                          x-cut-buffer-max))
 -
 -;; Setup the default fontset.
 -(setup-default-fontset)
 -
 -;; Create the standard fontset.
 -(create-fontset-from-fontset-spec standard-fontset-spec t)
 -
 -;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
 -(create-fontset-from-x-resource)
 -
 -;; Try to create a fontset from a font specification which comes
 -;; from initial-frame-alist, default-frame-alist, or X resource.
 -;; A font specification in command line argument (i.e. -fn XXXX)
 -;; should be already in default-frame-alist as a `font'
 -;; parameter.  However, any font specifications in site-start
 -;; library, user's init file (.emacs), and default.el are not
 -;; yet handled here.
 -
 -(let ((font (or (cdr (assq 'font initial-frame-alist))
 -              (cdr (assq 'font default-frame-alist))
 -              (x-get-resource "font" "Font")))
 -      xlfd-fields resolved-name)
 -  (if (and font
 -         (not (query-fontset font))
 -         (setq resolved-name (x-resolve-font-name font))
 -         (setq xlfd-fields (x-decompose-font-name font)))
 -      (if (string= "fontset" (aref xlfd-fields xlfd-regexp-registry-subnum))
 -        (new-fontset font (x-complement-fontset-spec xlfd-fields nil))
 -      ;; Create a fontset from FONT.  The fontset name is
 -      ;; generated from FONT.
 -      (create-fontset-from-ascii-font font resolved-name "startup"))))
 -
 -;; Apply a geometry resource to the initial frame.  Put it at the end
 -;; of the alist, so that anything specified on the command line takes
 -;; precedence.
 -(let* ((res-geometry (x-get-resource "geometry" "Geometry"))
 -       parsed)
 -  (if res-geometry
 -      (progn
 -      (setq parsed (x-parse-geometry res-geometry))
 -      ;; If the resource specifies a position,
 -      ;; call the position and size "user-specified".
 -      (if (or (assq 'top parsed) (assq 'left parsed))
 -          (setq parsed (cons '(user-position . t)
 -                             (cons '(user-size . t) parsed))))
 -      ;; All geometry parms apply to the initial frame.
 -      (setq initial-frame-alist (append initial-frame-alist parsed))
 -      ;; The size parms apply to all frames.
 -      (if (assq 'height parsed)
 -          (setq default-frame-alist
 -                (cons (cons 'height (cdr (assq 'height parsed)))
 -                      default-frame-alist)))
 -      (if (assq 'width parsed)
 -          (setq default-frame-alist
 -                (cons (cons 'width (cdr (assq 'width parsed)))
 -                      default-frame-alist))))))
 -
 -;; Check the reverseVideo resource.
 -(let ((case-fold-search t))
 -  (let ((rv (x-get-resource "reverseVideo" "ReverseVideo")))
 -    (if (and rv
 -           (string-match "^\\(true\\|yes\\|on\\)$" rv))
 -      (setq default-frame-alist
 -            (cons '(reverse . t) default-frame-alist)))))
++(defun x-clipboard-yank ()
++  "Insert the clipboard contents, or the last stretch of killed text."
++  (interactive)
++  (let ((clipboard-text (x-get-selection 'CLIPBOARD))
++      (x-select-enable-clipboard t))
++    (if (and clipboard-text (> (length clipboard-text) 0))
++      (kill-new clipboard-text))
++    (yank)))
 -;; Set x-selection-timeout, measured in milliseconds.
 -(let ((res-selection-timeout
 -       (x-get-resource "selectionTimeout" "SelectionTimeout")))
 -  (setq x-selection-timeout 20000)
 -  (if res-selection-timeout
 -      (setq x-selection-timeout (string-to-number res-selection-timeout))))
 +\f
 +;;; Window system initialization.
  
  (defun x-win-suspend-error ()
    (error "Suspending an Emacs running under X makes no sense"))
 -(add-hook 'suspend-hook 'x-win-suspend-error)
  
 -;;; Arrange for the kill and yank functions to set and check the clipboard.
 -(setq interprogram-cut-function 'x-select-text)
 -(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
 +(defvar x-initialized nil
 +  "Non-nil if the X window system has been initialized.")
 +
 +(defun x-initialize-window-system ()
 +  "Initialize Emacs for X frames and open the first connection to an X server."
 +  ;; Make sure we have a valid resource name.
 +  (or (stringp x-resource-name)
 +      (let (i)
 +      (setq x-resource-name (invocation-name))
 +
 +      ;; Change any . or * characters in x-resource-name to hyphens,
 +      ;; so as not to choke when we use it in X resource queries.
 +      (while (setq i (string-match "[.*]" x-resource-name))
 +        (aset x-resource-name i ?-))))
 +
 +  (x-open-connection (or x-display-name
 +                       (setq x-display-name (getenv "DISPLAY")))
 +                   x-command-line-resources
 +                   ;; Exit Emacs with fatal error if this fails and we
 +                   ;; are the initial display.
 +                   (eq initial-window-system 'x))
 +
 +  (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
 +                            x-cut-buffer-max))
 +
 +  ;; Setup the default fontset.
 +  (setup-default-fontset)
 +
 +  ;; Create the standard fontset.
 +  (create-fontset-from-fontset-spec standard-fontset-spec t)
 +
 +  ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
 +  (create-fontset-from-x-resource)
 +
 +  ;; Try to create a fontset from a font specification which comes
 +  ;; from initial-frame-alist, default-frame-alist, or X resource.
 +  ;; A font specification in command line argument (i.e. -fn XXXX)
 +  ;; should be already in default-frame-alist as a `font'
 +  ;; parameter.  However, any font specifications in site-start
 +  ;; library, user's init file (.emacs), and default.el are not
 +  ;; yet handled here.
 +
 +  (let ((font (or (cdr (assq 'font initial-frame-alist))
 +                (cdr (assq 'font default-frame-alist))
 +                (x-get-resource "font" "Font")))
 +      xlfd-fields resolved-name)
 +    (if (and font
 +           (not (query-fontset font))
 +           (setq resolved-name (x-resolve-font-name font))
 +           (setq xlfd-fields (x-decompose-font-name font)))
 +      (if (string= "fontset" (aref xlfd-fields xlfd-regexp-registry-subnum))
 +          (new-fontset font (x-complement-fontset-spec xlfd-fields nil))
 +        ;; Create a fontset from FONT.  The fontset name is
 +        ;; generated from FONT.
 +        (create-fontset-from-ascii-font font resolved-name "startup"))))
 +
-   ;; Sun expects the menu bar cut and paste commands to use the clipboard.
-   ;; This has ,? to match both on Sunos and on Solaris.
-   (if (string-match "Sun Microsystems,? Inc\\."
-                   (x-server-vendor))
-       (menu-bar-enable-clipboard))
 +  ;; Apply a geometry resource to the initial frame.  Put it at the end
 +  ;; of the alist, so that anything specified on the command line takes
 +  ;; precedence.
 +  (let* ((res-geometry (x-get-resource "geometry" "Geometry"))
 +       parsed)
 +    (if res-geometry
 +      (progn
 +        (setq parsed (x-parse-geometry res-geometry))
 +        ;; If the resource specifies a position,
 +        ;; call the position and size "user-specified".
 +        (if (or (assq 'top parsed) (assq 'left parsed))
 +            (setq parsed (cons '(user-position . t)
 +                               (cons '(user-size . t) parsed))))
 +        ;; All geometry parms apply to the initial frame.
 +        (setq initial-frame-alist (append initial-frame-alist parsed))
 +        ;; The size parms apply to all frames.
 +        (if (assq 'height parsed)
 +            (setq default-frame-alist
 +                  (cons (cons 'height (cdr (assq 'height parsed)))
 +                        default-frame-alist)))
 +        (if (assq 'width parsed)
 +            (setq default-frame-alist
 +                  (cons (cons 'width (cdr (assq 'width parsed)))
 +                        default-frame-alist))))))
 +
 +  ;; Check the reverseVideo resource.
 +  (let ((case-fold-search t))
 +    (let ((rv (x-get-resource "reverseVideo" "ReverseVideo")))
 +      (if (and rv
 +             (string-match "^\\(true\\|yes\\|on\\)$" rv))
 +        (setq default-frame-alist
 +              (cons '(reverse . t) default-frame-alist)))))
  
 -;;; Turn off window-splitting optimization; X is usually fast enough
 -;;; that this is only annoying.
 -(setq split-window-keep-point t)
 +  ;; Set x-selection-timeout, measured in milliseconds.
 +  (let ((res-selection-timeout
 +       (x-get-resource "selectionTimeout" "SelectionTimeout")))
 +    (setq x-selection-timeout 20000)
 +    (if res-selection-timeout
 +      (setq x-selection-timeout (string-to-number res-selection-timeout))))
  
 -;; Don't show the frame name; that's redundant with X.
 -(setq-default mode-line-frame-identification "  ")
 +  ;; XXX This is wrong in general with multi-tty support.
 +  (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
 +                           global-map)
  
 -;; Motif direct handling of f10 wasn't working right,
 -;; So temporarily we've turned it off in lwlib-Xm.c
 -;; and turned the Emacs f10 back on.
 -;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
 -;; (if (featurep 'motif)
 -;;     (global-set-key [f10] 'ignore))
 +  ;; XXX This is wrong in general with multi-tty support.
 +  (add-hook 'suspend-hook 'x-win-suspend-error)
  
 -;; Turn on support for mouse wheels.
 -(mouse-wheel-mode 1)
 +  ;; Arrange for the kill and yank functions to set and check the clipboard.
 +  (setq interprogram-cut-function 'x-select-text)
 +  (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
  
 -;; Enable CLIPBOARD copy/paste through menu bar commands.
 -(menu-bar-enable-clipboard)
 +  ;; Turn off window-splitting optimization; X is usually fast enough
 +  ;; that this is only annoying.
 +  (setq split-window-keep-point t)
  
 -;; Override Paste so it looks at CLIPBOARD first.
 -(defun x-clipboard-yank ()
 -  "Insert the clipboard contents, or the last stretch of killed text."
 -  (interactive)
 -  (let ((clipboard-text (x-get-selection 'CLIPBOARD))
 -      (x-select-enable-clipboard t))
 -    (if (and clipboard-text (> (length clipboard-text) 0))
 -      (kill-new clipboard-text))
 -    (yank)))
 +  ;; Motif direct handling of f10 wasn't working right,
 +  ;; So temporarily we've turned it off in lwlib-Xm.c
 +  ;; and turned the Emacs f10 back on.
 +  ;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
 +  ;; (if (featurep 'motif)
 +  ;;     (global-set-key [f10] 'ignore))
 +
 +  ;; Turn on support for mouse wheels.
 +  (mouse-wheel-mode 1)
 +
++  ;; Enable CLIPBOARD copy/paste through menu bar commands.
++  (menu-bar-enable-clipboard)
++
++  ;; Override Paste so it looks at CLIPBOARD first.
++  (define-key menu-bar-edit-menu [paste]
++    (cons "Paste" (cons "Paste text from clipboard or kill ring"
++                      'x-clipboard-yank)))
++
 +  (setq x-initialized t))
 +
 +(add-to-list 'handle-args-function-alist '(x . x-handle-args))
 +(add-to-list 'frame-creation-function-alist '(x . x-create-frame-with-faces))
 +(add-to-list 'window-system-initialization-alist '(x . x-initialize-window-system))
  
 -(define-key menu-bar-edit-menu [paste]
 -  (cons "Paste" (cons "Paste text from clipboard or kill ring"
 -                    'x-clipboard-yank)))
 +(provide 'x-win)
  
  ;;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
  ;;; x-win.el ends here
diff --cc lisp/vc-cvs.el
index 9b37d4976edbecad4609d4b70e1fc0a71b901c70,400a1ffb1057cb14dd140c1547c4262cdeff0000..feb73dd5c313636ec2e789dd717d92e521dc212b
@@@ -5,7 -5,7 +5,7 @@@
  ;; Author:      FSF (see vc.el for full credits)
  ;; Maintainer:  Andre Spiegel <spiegel@gnu.org>
  
--;; $Id: vc-cvs.el,v 1.66 2003/10/01 13:22:53 fx Exp $
++;; $Id: vc-cvs.el,v 1.67 2004/01/20 17:41:18 uid65624 Exp $
  
  ;; This file is part of GNU Emacs.
  
diff --cc lisp/vc.el
index 79ce8594599e68133ca3b1b7e0642aa74d8053fd,d8402e9c04b158405e07c24df2fd30bd7492e9b3..383ffa6fae896a7f240fef4b280a7d0330a22391
@@@ -7,7 -7,7 +7,7 @@@
  ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
  ;; Keywords: tools
  
- ;; $Id: vc.el,v 1.361 2003/12/24 23:18:10 uid66361 Exp $
 -;; $Id: vc.el,v 1.362 2004/01/20 17:39:09 uid65624 Exp $
++;; $Id: vc.el,v 1.363 2004/01/21 11:05:51 uid65624 Exp $
  
  ;; This file is part of GNU Emacs.
  
diff --cc src/alloc.c
Simple merge
diff --cc src/buffer.c
Simple merge
Simple merge
diff --cc src/dispnew.c
index 81a0f1f5c8ebea267078df7a33671657f5ddde9f,65d4726b1dfa394d73744b05a4b1e27450684649..b62fd8f8b8fa7878efd9e1632323b4992575a16a
@@@ -3647,12 -3655,15 +3647,16 @@@ direct_output_for_insert (g
        cursor_to (y, x);
      }
  
 -  if (rif)
 -    rif->update_window_end_hook (w, 1, 0);
+ #ifdef HAVE_WINDOW_SYSTEM
+   update_window_fringes (w, 0);
+ #endif
 +  if (FRAME_RIF (f))
 +    FRAME_RIF (f)->update_window_end_hook (w, 1, 0);
    update_end (f);
    updated_row = NULL;
 -  fflush (stdout);
 +  if (FRAME_TERMCAP_P (f))
 +    fflush (TTY_OUTPUT (FRAME_TTY (f)));
  
    TRACE ((stderr, "direct output for insert\n"));
    mark_window_display_accurate (it.window, 1);
diff --cc src/fontset.c
Simple merge
diff --cc src/keyboard.c
index 1897fb5c0f833a60f5102aa3535c60d41e839a6d,36dabad804fd115a693525fd0a640b327167d38e..cdf28bd5e66baada6f67544b1084cf49cd850a39
@@@ -6802,9 -6708,32 +6765,33 @@@ tty_read_avail_input (struct display *d
  
    return nread;
  }
 +
  #endif /* not VMS */
  \f
+ void
+ handle_async_input ()
+ {
+ #ifdef BSD4_1
+   extern int select_alarmed;
+ #endif
+   interrupt_input_pending = 0;
+   while (1)
+     {
+       int nread;
+       nread = read_avail_input (1);
+       /* -1 means it's not ok to read the input now.
+        UNBLOCK_INPUT will read it later; now, avoid infinite loop.
+        0 means there was no keyboard input available.  */
+       if (nread <= 0)
+       break;
+ #ifdef BSD4_1
+       select_alarmed = 1;  /* Force the select emulator back to life */
+ #endif
+     }
+ }
  #ifdef SIGIO   /* for entire page */
  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
  
diff --cc src/lisp.h
Simple merge
diff --cc src/lread.c
Simple merge
diff --cc src/macterm.c
Simple merge
diff --cc src/process.c
Simple merge
diff --cc src/w32term.c
Simple merge
diff --cc src/xdisp.c
index 675aa696a591bc7c3e861fe6967573a0e868eb0a,3241822e7b495da76e1c301b7c339ef1530815d0..fc09df3b49adda5c86b3c9ca0fccd37156c00bba
@@@ -9023,9 -9300,15 +9296,15 @@@ draw_fringe_bitmap (w, row, left_p
      }
  
    /* Adjust y to the offset in the row to start drawing the bitmap.  */
-   p.y += (row->height - p.h) / 2;
+   if (period == 0)
+     p.y += (row->height - p.h) / 2;
+   else if (period == -2)
+     {
+       p.h = fringe_bitmaps[which].height;
+       p.y += (row->visible_height - p.h);
+     }
  
 -  rif->draw_fringe_bitmap (w, row, &p);
 +  FRAME_RIF (f)->draw_fringe_bitmap (w, row, &p);
  }
  
  /* Draw fringe bitmaps for glyph row ROW on window W.  Call this
@@@ -11389,11 -11673,140 +11669,142 @@@ set_vertical_scroll_bar (w
      start = end = whole = 0;
  
    /* Indicate what this scroll bar ought to be displaying now.  */
 -  set_vertical_scroll_bar_hook (w, end - start, whole, start);
 +  if (FRAME_DISPLAY (XFRAME (w->frame))->set_vertical_scroll_bar_hook)
 +    (*FRAME_DISPLAY (XFRAME (w->frame))->set_vertical_scroll_bar_hook)
 +      (w, end - start, whole, start);
  }
  
+ #ifdef HAVE_WINDOW_SYSTEM
+ /* Recalculate the bitmaps to show in the fringes of window W.
+    If FORCE_P is 0, only mark rows with modified bitmaps for update in
+    redraw_fringe_bitmaps_p; else mark all rows for update.  */
+ int
+ update_window_fringes (w, force_p)
+      struct window *w;
+      int force_p;
+ {
+   struct glyph_row *row, *cur = 0;
+   int yb = window_text_bottom_y (w);
+   int rn, nrows = w->current_matrix->nrows;
+   int y;
+   int redraw_p = 0;
+   Lisp_Object ind;
+   if (w->pseudo_window_p)
+     return 0;
+   if (!MINI_WINDOW_P (w)
+       && (ind = XBUFFER (w->buffer)->indicate_buffer_boundaries, !NILP (ind)))
+     {
+       int do_eob = 1, do_bob = 1;
+       for (y = 0, rn = 0;
+          y < yb && rn < nrows;
+          y += row->height, ++rn)
+       {
+         unsigned indicate_bob_p, indicate_top_line_p;
+         unsigned indicate_eob_p, indicate_bottom_line_p;
+         
+         row = w->desired_matrix->rows + rn;
+         if (!row->enabled_p)
+           row = w->current_matrix->rows + rn;
+         indicate_bob_p = row->indicate_bob_p;
+         indicate_top_line_p = row->indicate_top_line_p;
+         indicate_eob_p = row->indicate_eob_p;
+         indicate_bottom_line_p = row->indicate_bottom_line_p;
+         
+         row->indicate_bob_p = row->indicate_top_line_p = 0;
+         row->indicate_eob_p = row->indicate_bottom_line_p = 0;
+         if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)))
+           row->indicate_bob_p = do_bob, do_bob = 0;
+         else if (EQ (ind, Qt)
+                  && (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) == rn)
+           row->indicate_top_line_p = 1;
+         if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)))
+           row->indicate_eob_p = do_eob, do_eob = 0;
+         else if (EQ (ind, Qt)
+                  && y + row->height >= yb)
+           row->indicate_bottom_line_p = 1;
+         if (indicate_bob_p != row->indicate_bob_p
+             || indicate_top_line_p != row->indicate_top_line_p
+             || indicate_eob_p != row->indicate_eob_p
+             || indicate_bottom_line_p != row->indicate_bottom_line_p)
+           row->redraw_fringe_bitmaps_p = 1;
+       }
+     }
+   for (y = 0, rn = 0;
+        y < yb && rn < nrows;
+        y += row->height, rn++)
+     {
+       enum fringe_bitmap_type left, right;
+       row = w->desired_matrix->rows + rn;
+       cur = w->current_matrix->rows + rn;
+       if (!row->enabled_p)
+       row = cur;
+       /* Decide which bitmap to draw in the left fringe.  */
+       if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
+       left = NO_FRINGE_BITMAP;
+       else if (row->overlay_arrow_p)
+       left = OVERLAY_ARROW_BITMAP;
+       else if (row->truncated_on_left_p)
+       left = LEFT_TRUNCATION_BITMAP;
+       else if (MATRIX_ROW_CONTINUATION_LINE_P (row))
+       left = CONTINUATION_LINE_BITMAP;
+       else if (row->indicate_empty_line_p)
+       left = ZV_LINE_BITMAP;
+       else if (row->indicate_bob_p)
+       left = FIRST_LINE_BITMAP;
+       else
+       left = NO_FRINGE_BITMAP;
+       /* Decide which bitmap to draw in the right fringe.  */
+       if (WINDOW_RIGHT_FRINGE_WIDTH (w) == 0)
+       right = NO_FRINGE_BITMAP;
+       else if (row->truncated_on_right_p)
+       right = RIGHT_TRUNCATION_BITMAP;
+       else if (row->continued_p)
+       right = CONTINUED_LINE_BITMAP;
+       else if (row->indicate_eob_p)
+       right = LAST_LINE_BITMAP;
+       else if (row->indicate_top_line_p) 
+       right = UP_ARROW_BITMAP;
+       else if (row->indicate_bottom_line_p)
+       right = DOWN_ARROW_BITMAP;
+       else if (row->indicate_empty_line_p && WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
+       right = ZV_LINE_BITMAP;
+       else
+       right = NO_FRINGE_BITMAP;
+       if (force_p
+         || row->y != cur->y
+         || row->visible_height != cur->visible_height
+         || left != cur->left_fringe_bitmap
+         || right != cur->right_fringe_bitmap
+         || cur->redraw_fringe_bitmaps_p)
+       {
+         redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
+         cur->left_fringe_bitmap = left;
+         cur->right_fringe_bitmap = right;
+       }
+       row->left_fringe_bitmap = left;
+       row->right_fringe_bitmap = right;
+     }
+   return redraw_p;
+ }
+ #endif /* HAVE_WINDOW_SYSTEM */
  /* Redisplay leaf window WINDOW.  JUST_THIS_ONE_P non-zero means only
     selected_window is redisplayed.
  
@@@ -12473,12 -12903,11 +12902,11 @@@ try_window_reusing_current_matrix (w
  
        if (run.height)
        {
-         struct frame *f = XFRAME (WINDOW_FRAME (w));
          update_begin (f);
 -        rif->update_window_begin_hook (w);
 -        rif->clear_window_mouse_face (w);
 -        rif->scroll_run_hook (w, &run);
 -        rif->update_window_end_hook (w, 0, 0);
 +        FRAME_RIF (f)->update_window_begin_hook (w);
 +        FRAME_RIF (f)->clear_window_mouse_face (w);
 +        FRAME_RIF (f)->scroll_run_hook (w, &run);
 +        FRAME_RIF (f)->update_window_end_hook (w, 0, 0);
          update_end (f);
        }
  
diff --cc src/xterm.c
Simple merge