diff options
| author | Karl Heuer | 1994-02-24 19:08:19 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-02-24 19:08:19 +0000 |
| commit | 0fa767e7a9d4562fa6541af7b7f2f17a2b38d419 (patch) | |
| tree | 5b31ea0d5475095c55f812065237253b4a00c8d0 /src | |
| parent | 9b63095b621de6e62847fb8135a63d50c451d894 (diff) | |
| download | emacs-0fa767e7a9d4562fa6541af7b7f2f17a2b38d419.tar.gz emacs-0fa767e7a9d4562fa6541af7b7f2f17a2b38d419.zip | |
(sort_overlays): Allow for null window.
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/buffer.c b/src/buffer.c index 2f21a7b133f..b9f699436f0 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1422,34 +1422,34 @@ sort_overlays (overlay_vec, noverlays, w) | |||
| 1422 | 1422 | ||
| 1423 | for (i = 0, j = 0; i < noverlays; i++) | 1423 | for (i = 0, j = 0; i < noverlays; i++) |
| 1424 | { | 1424 | { |
| 1425 | Lisp_Object tem; | ||
| 1425 | Lisp_Object overlay = overlay_vec[i]; | 1426 | Lisp_Object overlay = overlay_vec[i]; |
| 1426 | 1427 | ||
| 1427 | if (OVERLAY_VALID (overlay) | 1428 | if (OVERLAY_VALID (overlay) |
| 1428 | && OVERLAY_POSITION (OVERLAY_START (overlay)) > 0 | 1429 | && OVERLAY_POSITION (OVERLAY_START (overlay)) > 0 |
| 1429 | && OVERLAY_POSITION (OVERLAY_END (overlay)) > 0) | 1430 | && OVERLAY_POSITION (OVERLAY_END (overlay)) > 0) |
| 1430 | { | 1431 | { |
| 1431 | Lisp_Object window; | 1432 | /* If we're interested in a specific window, then ignore |
| 1432 | window = Foverlay_get (overlay, Qwindow); | 1433 | overlays that are limited to some other window. */ |
| 1433 | 1434 | if (w) | |
| 1434 | /* Also ignore overlays limited to one window | ||
| 1435 | if it's not the window we are using. */ | ||
| 1436 | if (XTYPE (window) != Lisp_Window | ||
| 1437 | || XWINDOW (window) == w) | ||
| 1438 | { | 1435 | { |
| 1439 | Lisp_Object tem; | 1436 | Lisp_Object window; |
| 1440 | 1437 | ||
| 1441 | /* This overlay is good and counts: | 1438 | window = Foverlay_get (overlay, Qwindow); |
| 1442 | put it in sortvec. */ | 1439 | if (XTYPE (window) == Lisp_Window && XWINDOW (window) != w) |
| 1443 | sortvec[j].overlay = overlay; | 1440 | continue; |
| 1444 | sortvec[j].beg = OVERLAY_POSITION (OVERLAY_START (overlay)); | ||
| 1445 | sortvec[j].end = OVERLAY_POSITION (OVERLAY_END (overlay)); | ||
| 1446 | tem = Foverlay_get (overlay, Qpriority); | ||
| 1447 | if (INTEGERP (tem)) | ||
| 1448 | sortvec[j].priority = XINT (tem); | ||
| 1449 | else | ||
| 1450 | sortvec[j].priority = 0; | ||
| 1451 | j++; | ||
| 1452 | } | 1441 | } |
| 1442 | |||
| 1443 | /* This overlay is good and counts: put it into sortvec. */ | ||
| 1444 | sortvec[j].overlay = overlay; | ||
| 1445 | sortvec[j].beg = OVERLAY_POSITION (OVERLAY_START (overlay)); | ||
| 1446 | sortvec[j].end = OVERLAY_POSITION (OVERLAY_END (overlay)); | ||
| 1447 | tem = Foverlay_get (overlay, Qpriority); | ||
| 1448 | if (INTEGERP (tem)) | ||
| 1449 | sortvec[j].priority = XINT (tem); | ||
| 1450 | else | ||
| 1451 | sortvec[j].priority = 0; | ||
| 1452 | j++; | ||
| 1453 | } | 1453 | } |
| 1454 | } | 1454 | } |
| 1455 | noverlays = j; | 1455 | noverlays = j; |