aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 006153b0424..328963be78c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -146,7 +146,7 @@ static Lisp_Object Qoverlayp;
146 146
147Lisp_Object Qpriority, Qbefore_string, Qafter_string; 147Lisp_Object Qpriority, Qbefore_string, Qafter_string;
148 148
149static Lisp_Object Qevaporate; 149static Lisp_Object Qclone_number, Qevaporate;
150 150
151Lisp_Object Qmodification_hooks; 151Lisp_Object Qmodification_hooks;
152Lisp_Object Qinsert_in_front_hooks; 152Lisp_Object Qinsert_in_front_hooks;
@@ -2900,10 +2900,13 @@ sort_overlays (Lisp_Object *overlay_vec, ptrdiff_t noverlays, struct window *w)
2900 overlays that are limited to some other window. */ 2900 overlays that are limited to some other window. */
2901 if (w) 2901 if (w)
2902 { 2902 {
2903 Lisp_Object window; 2903 Lisp_Object window, clone_number;
2904 2904
2905 window = Foverlay_get (overlay, Qwindow); 2905 window = Foverlay_get (overlay, Qwindow);
2906 if (WINDOWP (window) && XWINDOW (window) != w) 2906 clone_number = Foverlay_get (overlay, Qclone_number);
2907 if (WINDOWP (window) && XWINDOW (window) != w
2908 && (! NUMBERP (clone_number)
2909 || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
2907 continue; 2910 continue;
2908 } 2911 }
2909 2912
@@ -3032,7 +3035,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str,
3032EMACS_INT 3035EMACS_INT
3033overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) 3036overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
3034{ 3037{
3035 Lisp_Object overlay, window, str; 3038 Lisp_Object overlay, window, clone_number, str;
3036 struct Lisp_Overlay *ov; 3039 struct Lisp_Overlay *ov;
3037 EMACS_INT startpos, endpos; 3040 EMACS_INT startpos, endpos;
3038 int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); 3041 int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
@@ -3051,8 +3054,12 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
3051 if (endpos != pos && startpos != pos) 3054 if (endpos != pos && startpos != pos)
3052 continue; 3055 continue;
3053 window = Foverlay_get (overlay, Qwindow); 3056 window = Foverlay_get (overlay, Qwindow);
3054 if (WINDOWP (window) && XWINDOW (window) != w) 3057 clone_number = Foverlay_get (overlay, Qclone_number);
3058 if (WINDOWP (window) && XWINDOW (window) != w
3059 && (! NUMBERP (clone_number)
3060 || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
3055 continue; 3061 continue;
3062
3056 if (startpos == pos 3063 if (startpos == pos
3057 && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str))) 3064 && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
3058 record_overlay_string (&overlay_heads, str, 3065 record_overlay_string (&overlay_heads, str,
@@ -3079,7 +3086,10 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
3079 if (endpos != pos && startpos != pos) 3086 if (endpos != pos && startpos != pos)
3080 continue; 3087 continue;
3081 window = Foverlay_get (overlay, Qwindow); 3088 window = Foverlay_get (overlay, Qwindow);
3082 if (WINDOWP (window) && XWINDOW (window) != w) 3089 clone_number = Foverlay_get (overlay, Qclone_number);
3090 if (WINDOWP (window) && XWINDOW (window) != w
3091 && (! NUMBERP (clone_number)
3092 || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
3083 continue; 3093 continue;
3084 if (startpos == pos 3094 if (startpos == pos
3085 && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str))) 3095 && (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
@@ -5219,6 +5229,7 @@ syms_of_buffer (void)
5219 DEFSYM (Qinsert_behind_hooks, "insert-behind-hooks"); 5229 DEFSYM (Qinsert_behind_hooks, "insert-behind-hooks");
5220 DEFSYM (Qget_file_buffer, "get-file-buffer"); 5230 DEFSYM (Qget_file_buffer, "get-file-buffer");
5221 DEFSYM (Qpriority, "priority"); 5231 DEFSYM (Qpriority, "priority");
5232 DEFSYM (Qclone_number, "clone-number");
5222 DEFSYM (Qbefore_string, "before-string"); 5233 DEFSYM (Qbefore_string, "before-string");
5223 DEFSYM (Qafter_string, "after-string"); 5234 DEFSYM (Qafter_string, "after-string");
5224 DEFSYM (Qfirst_change_hook, "first-change-hook"); 5235 DEFSYM (Qfirst_change_hook, "first-change-hook");