emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master fd8f724: * src/xdisp.c (overlay_arrows_changed_


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master fd8f724: * src/xdisp.c (overlay_arrows_changed_p): Fix last change.
Date: Tue, 28 Feb 2017 12:47:05 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> Stefan, I don't understand the new semantics of
> overlay_arrows_changed_p, and even less so after your latest updates.

Does the patch below clarify the situation and clean up the behavior enough?
I'm still wondering about

                /* FIXME: Don't we have a problem, using such a global
                 * "last-position" if the variable is buffer-local?  */


-- Stefan


diff --git a/src/xdisp.c b/src/xdisp.c
index 4e87001abf..1f8878408b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13338,12 +13338,15 @@ overlay_arrow_in_current_buffer_p (void)
 
 
 /* Return true if any overlay_arrows have moved or overlay-arrow-string
-   has changed.  */
+   has changed.
+   If SET_REDISPLAY is true, additionally, set the `redisplay' bit in those
+   buffers that are affected.  */
 
 static bool
 overlay_arrows_changed_p (bool set_redisplay)
 {
   Lisp_Object vlist;
+  bool changed = false;
 
   for (vlist = Voverlay_arrow_variable_list;
        CONSP (vlist);
@@ -13370,12 +13373,13 @@ overlay_arrows_changed_p (bool set_redisplay)
             {
               if (buf)
                bset_redisplay (buf);
+              changed = true;
             }
          else
            return true;
        }
     }
-  return false;
+  return changed;
 }
 
 /* Mark overlay arrows to be updated on next redisplay.  */
@@ -13397,6 +13401,8 @@ update_overlay_arrows (int up_to_date)
       if (up_to_date > 0)
        {
          Lisp_Object val = find_symbol_value (var);
+          if (!MARKERP (val))
+           continue;
          Fput (var, Qlast_arrow_position,
                COERCE_MARKER (val));
          Fput (var, Qlast_arrow_string,



reply via email to

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