emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104759: Have overlays with window pr


From: martin rudalics
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104759: Have overlays with window property respect clone numbers.
Date: Mon, 27 Jun 2011 11:27:44 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104759
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Mon 2011-06-27 11:27:44 +0200
message:
  Have overlays with window property respect clone numbers.
  
  * buffer.c (Qclone_number): Declare static and DEFSYM it.
  (sort_overlays, overlay_strings): When an overlay's clone number
  matches the window's clone number process the overlay even if
  the overlay's window property doesn't match the current window.
modified:
  src/ChangeLog
  src/buffer.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-06-26 18:47:07 +0000
+++ b/src/ChangeLog     2011-06-27 09:27:44 +0000
@@ -1,3 +1,10 @@
+2011-06-27  Martin Rudalics  <address@hidden>
+
+       * buffer.c (Qclone_number): Declare static and DEFSYM it.
+       (sort_overlays, overlay_strings): When an overlay's clone number
+       matches the window's clone number process the overlay even if
+       the overlay's window property doesn't match the current window.
+
 2011-06-26  Jan Djärv  <address@hidden>
 
        * emacsgtkfixed.h: State that this is only used with Gtk+3.

=== modified file 'src/buffer.c'
--- a/src/buffer.c      2011-06-24 21:25:22 +0000
+++ b/src/buffer.c      2011-06-27 09:27:44 +0000
@@ -146,7 +146,7 @@
 
 Lisp_Object Qpriority, Qbefore_string, Qafter_string;
 
-static Lisp_Object Qevaporate;
+static Lisp_Object Qclone_number, Qevaporate;
 
 Lisp_Object Qmodification_hooks;
 Lisp_Object Qinsert_in_front_hooks;
@@ -2900,10 +2900,13 @@
             overlays that are limited to some other window.  */
          if (w)
            {
-             Lisp_Object window;
+             Lisp_Object window, clone_number;
 
              window = Foverlay_get (overlay, Qwindow);
-             if (WINDOWP (window) && XWINDOW (window) != w)
+             clone_number = Foverlay_get (overlay, Qclone_number);
+             if (WINDOWP (window) && XWINDOW (window) != w
+                 && (! NUMBERP (clone_number)
+                     || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
                continue;
            }
 
@@ -3032,7 +3035,7 @@
 EMACS_INT
 overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
 {
-  Lisp_Object overlay, window, str;
+  Lisp_Object overlay, window, clone_number, str;
   struct Lisp_Overlay *ov;
   EMACS_INT startpos, endpos;
   int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
@@ -3051,8 +3054,12 @@
       if (endpos != pos && startpos != pos)
        continue;
       window = Foverlay_get (overlay, Qwindow);
-      if (WINDOWP (window) && XWINDOW (window) != w)
+      clone_number = Foverlay_get (overlay, Qclone_number);
+      if (WINDOWP (window) && XWINDOW (window) != w
+         && (! NUMBERP (clone_number)
+             || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
        continue;
+
       if (startpos == pos
          && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
        record_overlay_string (&overlay_heads, str,
@@ -3079,7 +3086,10 @@
       if (endpos != pos && startpos != pos)
        continue;
       window = Foverlay_get (overlay, Qwindow);
-      if (WINDOWP (window) && XWINDOW (window) != w)
+      clone_number = Foverlay_get (overlay, Qclone_number);
+      if (WINDOWP (window) && XWINDOW (window) != w
+         && (! NUMBERP (clone_number)
+             || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
        continue;
       if (startpos == pos
          && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
@@ -5219,6 +5229,7 @@
   DEFSYM (Qinsert_behind_hooks, "insert-behind-hooks");
   DEFSYM (Qget_file_buffer, "get-file-buffer");
   DEFSYM (Qpriority, "priority");
+  DEFSYM (Qclone_number, "clone-number");
   DEFSYM (Qbefore_string, "before-string");
   DEFSYM (Qafter_string, "after-string");
   DEFSYM (Qfirst_change_hook, "first-change-hook");


reply via email to

[Prev in Thread] Current Thread [Next in Thread]