emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auto-overlays 67776d2 25/93: Parse functions must set b


From: Stefan Monnier
Subject: [elpa] externals/auto-overlays 67776d2 25/93: Parse functions must set basic overlay properties themselves
Date: Mon, 14 Dec 2020 13:00:30 -0500 (EST)

branch: externals/auto-overlays
commit 67776d29bfb382c6706a66618c87cc3df404cf61
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>

    Parse functions must set basic overlay properties themselves
    rather than leaving it to auto-overlay-update, since exclusive reparsing
    already requires them.
---
 auto-overlay-flat.el | 16 +++++++++++++++-
 auto-overlay-line.el | 11 ++++++++++-
 auto-overlay-nest.el | 13 ++++++++++++-
 auto-overlay-self.el | 14 ++++++++++++--
 auto-overlay-word.el | 12 ++++++++++--
 5 files changed, 59 insertions(+), 7 deletions(-)

diff --git a/auto-overlay-flat.el b/auto-overlay-flat.el
index c166622..be2d308 100644
--- a/auto-overlay-flat.el
+++ b/auto-overlay-flat.el
@@ -5,7 +5,7 @@
 ;; Copyright (C) 2006 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.1
+;; Version: 0.1.1
 ;; Keywords: automatic, overlays, flat, unnested
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -30,6 +30,11 @@
 
 ;;; Change Log:
 ;;
+;; Version 0.1.1
+;; * set overlay properties straight after creation, rather than leaving it to
+;;   `auto-overlay-update', in case matching causes exclusive reparsing, for
+;;   which properties are already required
+;;
 ;; Version 0.1
 ;; * initial version
 
@@ -78,12 +83,18 @@
           (o-end
            (let ((pos (overlay-get o-match 'delim-end)))
              (setq o-parent (make-overlay pos pos nil nil 'rear-advance)))
+           (overlay-put o-parent 'auto-overlay t)
+           (overlay-put o-parent 'set-id (overlay-get o-match 'set-id))
+           (overlay-put o-parent 'entry-id (overlay-get o-match 'entry-id))
            (auto-o-match-overlay o-parent o-match o-end)
            o-parent)
           
           (t ;; otherwise, make a new, end-unmatched overlay and return it
            (let ((pos (overlay-get o-match 'delim-end)))
              (setq o-parent (make-overlay pos pos nil nil 'read-advance))
+             (overlay-put o-parent 'auto-overlay t)
+             (overlay-put o-parent 'set-id (overlay-get o-match 'set-id))
+             (overlay-put o-parent 'entry-id (overlay-get o-match 'entry-id))
              (auto-o-match-overlay o-parent o-match 'unmatched)
              o-parent))
           ))))
@@ -114,6 +125,9 @@
            (auto-o-match-overlay o-parent nil o-match)
            (let ((pos (overlay-get o-start 'delim-end)))
              (setq o-parent (make-overlay pos pos nil nil 'read-advance))
+             (overlay-put o-parent 'auto-overlay t)
+             (overlay-put o-parent 'set-id (overlay-get o-match 'set-id))
+             (overlay-put o-parent 'entry-id (overlay-get o-match 'entry-id))
              (auto-o-match-overlay o-parent o-start o-end))
            o-parent))  ; return newly created overlay
        ))))
diff --git a/auto-overlay-line.el b/auto-overlay-line.el
index c2d8615..a0b1d10 100644
--- a/auto-overlay-line.el
+++ b/auto-overlay-line.el
@@ -5,7 +5,7 @@
 ;; Copyright (C) 2005 2006 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.3.2
+;; Version: 0.3.3
 ;; Keywords: automatic, overlays, line
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -30,6 +30,11 @@
 
 ;;; Change Log:
 ;;
+;; Version 0.3.3
+;; * set overlay properties straight after creation, rather than leaving it to
+;;   `auto-overlay-update', in case matching causes exclusive reparsing, for
+;;   which properties are already required
+;;
 ;; Version 0.3.2
 ;; * removed `auto-overlay-functions' and changed to use new interface
 ;;
@@ -74,6 +79,10 @@
                               (goto-char (overlay-get o-match 'delim-end))
                               (1+ (line-end-position))))))
     
+    ;; give new overlay some basic properties
+    (overlay-put o-new 'auto-overlay t)
+    (overlay-put o-new 'set-id (overlay-get o-match 'set-id))
+    (overlay-put o-new 'entry-id (overlay-get o-match 'entry-id))
     ;; match start of new overlay with match
     (auto-o-match-overlay o-new o-match nil)
     ;; set overlay's modification hooks to ensure that it always extends to
diff --git a/auto-overlay-nest.el b/auto-overlay-nest.el
index 90760b3..c879870 100644
--- a/auto-overlay-nest.el
+++ b/auto-overlay-nest.el
@@ -5,7 +5,7 @@
 ;; Copyright (C) 2005 2006 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.1.4
+;; Version: 0.1.5
 ;; Keywords: automatic, overlays, nested
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -30,6 +30,11 @@
 
 ;;; Change Log:
 ;;
+;; Version 0.1.5
+;; * set overlay properties straight after creation in `auto-o-make-nest',
+;;   rather than leaving it to `auto-overlay-update', in case matching causes
+;;   exclusive reparsing, for which properties are already required
+;;
 ;; Version 0.1.4
 ;; * removed `auto-overlay-functions' and changed to use new interface
 ;; * renamed from "stack" to "nest"
@@ -141,11 +146,17 @@
      ((eq (auto-o-edge o-match) 'start)
       (setq pos (overlay-get o-match 'delim-end))
       (setq o-new (make-overlay pos pos nil nil 'rear-advance))
+      (overlay-put o-new 'auto-overlay t)
+      (overlay-put o-new 'set-id (overlay-get o-match 'set-id))
+      (overlay-put o-new 'entry-id (overlay-get o-match 'entry-id))
       (auto-o-match-overlay o-new o-match 'unmatched))
      
      ((eq (auto-o-edge o-match) 'end)
       (setq pos (overlay-get o-match 'delim-start))
       (setq o-new (make-overlay pos pos nil nil 'rear-advance))
+      (overlay-put o-new 'auto-overlay t)
+      (overlay-put o-new 'set-id (overlay-get o-match 'set-id))
+      (overlay-put o-new 'entry-id (overlay-get o-match 'entry-id))
       (auto-o-match-overlay o-new 'unmatched o-match)))
 
     ;; return the new overlay
diff --git a/auto-overlay-self.el b/auto-overlay-self.el
index fde62ba..c34f4cc 100644
--- a/auto-overlay-self.el
+++ b/auto-overlay-self.el
@@ -5,7 +5,7 @@
 ;; Copyright (C) 2005 2006 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.2.5
+;; Version: 0.2.6
 ;; Keywords: automatic, overlays, self
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -29,6 +29,11 @@
 
 ;;; Change Log:
 ;;
+;; Version 0.2.6
+;; * set overlay properties straight after creation in `auto-o-make-self',
+;;   rather than leaving it to `auto-overlay-update', in case matching causes
+;;   exclusive reparsing, for which properties are already required
+;;
 ;; Version 0.2.5
 ;; * removed `auto-overlay-functions' and changed to use new interface
 ;;
@@ -205,7 +210,12 @@
        ((number-or-marker-p end) (setq pos end))
        (t (setq pos (point-max))))
       (setq o-new (make-overlay pos pos nil nil 'rear-advance)))
-      
+    
+    ;; give overlay some basic properties
+    (overlay-put o-new 'auto-overlay t)
+    (overlay-put o-new 'set-id (overlay-get o-start 'set-id))
+    (overlay-put o-new 'entry-id (overlay-get o-start 'entry-id))
+    
     ;; if overlay is end-unmatched, add it to the list of uncascaded overlays
     (unless (overlayp end) (push o-new auto-o-pending-self-cascade))
     
diff --git a/auto-overlay-word.el b/auto-overlay-word.el
index f30b233..ee7567c 100644
--- a/auto-overlay-word.el
+++ b/auto-overlay-word.el
@@ -5,7 +5,7 @@
 ;; Copyright (C) 2005 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.1.2
+;; Version: 0.1.3
 ;; Keywords: automatic, overlays, word
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -30,6 +30,11 @@
 
 ;;; Change Log:
 ;;
+;; Version 0.1.3
+;; * set overlay properties straight after creation, rather than leaving it to
+;;   `auto-overlay-update', in case overlay is exclusive and we reparse, for
+;;   which properties are already required
+;;
 ;; Version 0.1.2
 ;; * removed `auto-overlay-functions' and changed to use new interface
 ;;
@@ -61,9 +66,12 @@
                             (overlay-get o-match 'delim-end)
                             nil nil 'rear-advance)))
     ;; give overlays appropriate properties
+    (overlay-put o-new 'auto-overlay t)
+    (overlay-put o-new 'set-id (overlay-get o-match 'set-id))
+    (overlay-put o-new 'entry-id (overlay-get o-match 'entry-id))
     (overlay-put o-new 'start o-match)
     (overlay-put o-match 'parent o-new)
-    ;; bundle properties inside list if not already, then update set overlay
+    ;; bundle properties inside list if not already, then update overlay
     ;; properties
     (let ((props (auto-o-props o-match)))
       (when (symbolp (car props)) (setq props (list props)))



reply via email to

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