aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1994-02-24 19:08:19 +0000
committerKarl Heuer <[email protected]>1994-02-24 19:08:19 +0000
commit0fa767e7a9d4562fa6541af7b7f2f17a2b38d419 (patch)
tree5b31ea0d5475095c55f812065237253b4a00c8d0 /src/buffer.c
parent9b63095b621de6e62847fb8135a63d50c451d894 (diff)
(sort_overlays): Allow for null window.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 2f21a7b133..b9f699436f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1422,34 +1422,34 @@ sort_overlays (overlay_vec, noverlays, w)
for (i = 0, j = 0; i < noverlays; i++)
{
+ Lisp_Object tem;
Lisp_Object overlay = overlay_vec[i];
if (OVERLAY_VALID (overlay)
&& OVERLAY_POSITION (OVERLAY_START (overlay)) > 0
&& OVERLAY_POSITION (OVERLAY_END (overlay)) > 0)
{
- Lisp_Object window;
- window = Foverlay_get (overlay, Qwindow);
-
- /* Also ignore overlays limited to one window
- if it's not the window we are using. */
- if (XTYPE (window) != Lisp_Window
- || XWINDOW (window) == w)
+ /* If we're interested in a specific window, then ignore
+ overlays that are limited to some other window. */
+ if (w)
{
- Lisp_Object tem;
-
- /* This overlay is good and counts:
- put it in sortvec. */
- sortvec[j].overlay = overlay;
- sortvec[j].beg = OVERLAY_POSITION (OVERLAY_START (overlay));
- sortvec[j].end = OVERLAY_POSITION (OVERLAY_END (overlay));
- tem = Foverlay_get (overlay, Qpriority);
- if (INTEGERP (tem))
- sortvec[j].priority = XINT (tem);
- else
- sortvec[j].priority = 0;
- j++;
+ Lisp_Object window;
+
+ window = Foverlay_get (overlay, Qwindow);
+ if (XTYPE (window) == Lisp_Window && XWINDOW (window) != w)
+ continue;
}
+
+ /* This overlay is good and counts: put it into sortvec. */
+ sortvec[j].overlay = overlay;
+ sortvec[j].beg = OVERLAY_POSITION (OVERLAY_START (overlay));
+ sortvec[j].end = OVERLAY_POSITION (OVERLAY_END (overlay));
+ tem = Foverlay_get (overlay, Qpriority);
+ if (INTEGERP (tem))
+ sortvec[j].priority = XINT (tem);
+ else
+ sortvec[j].priority = 0;
+ j++;
}
}
noverlays = j;