[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auto-overlays 878dfb6 28/93: More narrowing bugs.
From: |
Stefan Monnier |
Subject: |
[elpa] externals/auto-overlays 878dfb6 28/93: More narrowing bugs. |
Date: |
Mon, 14 Dec 2020 13:00:31 -0500 (EST) |
branch: externals/auto-overlays
commit 878dfb674d4fdb773a14bb7473ba2e321c29e1b2
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>
More narrowing bugs.
---
auto-overlays.el | 44 ++++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/auto-overlays.el b/auto-overlays.el
index d8453e3..de0a532 100644
--- a/auto-overlays.el
+++ b/auto-overlays.el
@@ -1058,26 +1058,30 @@ was saved."
;; calls the appropriate suicide function for match overlay O-SELF.
;; If FORCE is non-nil, O-SELF is deleted irrespective of whether its
;; overlay still matches.
-
- ;; this is here to avoid a weird bug(?) where the modification-hooks seem
- ;; to be called occasionally for overlays that have already been deleted
- (when (overlay-buffer o-self)
- ;; if match overlay no longer matches the text it covers...
- (unless (and (not force)
- (save-excursion
- (goto-char (overlay-start o-self))
- (looking-at (auto-o-regexp o-self)))
- (= (match-end 0) (overlay-end o-self)))
- ;; if we have a parent overlay, call appropriate suicide function,
- ;; schedule an update (necessary since if match regexp contains
- ;; "context", we may be comitting suicide only for the match overlay to
- ;; be recreated in a slightly different place), then delete ourselves
- (when (overlay-get o-self 'parent)
- (funcall (auto-o-suicide-function o-self) o-self))
- ;; Note: not supplying the 'set-id can avoid multiple, effectively
- ;; identical auto-overlay-update calls
- (auto-o-schedule-update (overlay-start o-self))
- (delete-overlay o-self)))
+
+ (save-restriction
+ (widen)
+ ;; this is here to avoid a weird bug(?) where the modification-hooks seem
+ ;; to be called occasionally for overlays that have already been deleted
+ (when (overlay-buffer o-self)
+ ;; if match overlay no longer matches the text it covers...
+ (unless (and (not force)
+ (save-excursion
+ (goto-char (overlay-start o-self))
+ (looking-at (auto-o-regexp o-self)))
+ (= (match-end 0) (overlay-end o-self)))
+ ;; if we have a parent overlay, call appropriate suicide function,
+ ;; schedule an update (necessary since if match regexp contains
+ ;; "context", we may be comitting suicide only for the match overlay
+ ;; to be recreated in a slightly different place), then delete
+ ;; ourselves
+ (when (overlay-get o-self 'parent)
+ (funcall (auto-o-suicide-function o-self) o-self))
+ ;; Note: not supplying the 'set-id can avoid multiple, effectively
+ ;; identical auto-overlay-update calls
+ (auto-o-schedule-update (overlay-start o-self))
+ (delete-overlay o-self)))
+ )
)
- [elpa] externals/auto-overlays 9e8ef72 36/93: Modified interface functions for defining auto-overlay regexps., (continued)
- [elpa] externals/auto-overlays 9e8ef72 36/93: Modified interface functions for defining auto-overlay regexps., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 5539596 56/93: Added missing (eval-when-compile (require 'cl))., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 0f02ef9 57/93: Fixed minor spelling errors in docstrings., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays f66e655 66/93: Update package headers for ELPA., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays cdf4e6a 70/93: Fix copyright assignment in auto-overlays manual., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 464d9ea 77/93: Refactor auto-overlay-regexps format and implement match hooks., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 9fe619d 85/93: Fix bugs in auto-overlay saving/loading., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays e6e8a76 87/93: Fix auto-overlay package loading so requiring auto-overlayys pulls in all standard classes., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays c9abb18 15/93: Added "flat" regexp class to auto overlay package., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 90829f9 16/93: Miscelaneous minor corrections., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 878dfb6 28/93: More narrowing bugs.,
Stefan Monnier <=
- [elpa] externals/auto-overlays 262dfd9 21/93: Brought docs up to date with latest auto-overlays.el changes., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 8d0dd07 26/93: Fixed bug due to narrowed buffer; improved update scheduling to avoid duplicate parses., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays bf24ebe 37/93: auto-overlay-unload functions now return regexp/definition being unloadewd., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 4d21f05 41/93: delete trailing whitespace, Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 6fb30c5 54/93: Compiler warning supression, and trivial code cleanup., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 3b6c32d 76/93: Implement auto-overlay regexp :exclusive property., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 4013238 80/93: Fix bug in match :exclusive processing., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 2b02fa5 83/93: Allow single symbols in auto-overlays-in property tests as a convenience., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 3fa9ac1 86/93: Fix bugs caused by auto-overlays-in no longer sorting result list., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays bcc73ad 12/93: Bug fix to do with updating exclusive overlays., Stefan Monnier, 2020/12/14