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

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

[elpa] externals/auto-overlays d66bab4 11/93: Fixed "self" regexp bugs i


From: Stefan Monnier
Subject: [elpa] externals/auto-overlays d66bab4 11/93: Fixed "self" regexp bugs in auto-overlay package.
Date: Mon, 14 Dec 2020 13:00:27 -0500 (EST)

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

    Fixed "self" regexp bugs in auto-overlay package.
    Added (overlooked) predictive latex subfig support file.
---
 auto-overlay-self.el    | 15 ++++++++++-----
 auto-overlays-compat.el |  8 ++++++--
 auto-overlays.el        | 15 +++++++++++++--
 3 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/auto-overlay-self.el b/auto-overlay-self.el
index 1f0628a..20429ef 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.3
+;; Version: 0.2.4
 ;; Keywords: automatic, overlays, self
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -29,6 +29,10 @@
 
 ;;; Change Log:
 ;;
+;; Version 0.2.4
+;; * fixed(?) bug in auto-o-self-list that caused it to
+;;   sometimes miss out the parent overlay itself from the list
+;;
 ;; Version 0.2.3
 ;; * updated to reflect changes in `auto-overlays.el'
 ;; * changed `auto-o-self-list' to make it run faster
@@ -322,11 +326,12 @@
     ;; create list of all overlays corresponding to same entry between O-START
     ;; and END
     (setq overlay-list
-         ;; Note: We add 1 to end to catch overlays that start at end. This
-         ;;       seems to give same results as the old version of
-         ;;       `auto-o-self-list' (above) in all circumstances.
+         ;; Note: We subtract 1 from start and add 1 to end to catch overlays
+         ;;       that end at start or start at end. This seems to give the
+         ;;       same results as the old version of `auto-o-self-list'
+         ;;       (above) in all circumstances.
          (auto-overlays-in
-          (overlay-get o-start 'delim-start) (1+ end)
+          (1- (overlay-get o-start 'delim-start)) (1+ end)
           (list
            '(identity auto-overlay)
            (list 'eq 'set-id (overlay-get o-start 'set-id))
diff --git a/auto-overlays-compat.el b/auto-overlays-compat.el
index b079fb7..672e926 100644
--- a/auto-overlays-compat.el
+++ b/auto-overlays-compat.el
@@ -5,7 +5,7 @@
 ;; Copyright (C) 2006 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.2
+;; Version: 0.3
 ;; Keywords: auto-overlay, automatic, overlays, compatability
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -30,6 +30,9 @@
 
 ;;; Change Log:
 ;;
+;; Version 0.3
+;; * fixed bug in line-number-at-pos compatibility function
+;;
 ;; Version 0.2
 ;; * added replace-regexps-in-string compatibility function
 ;;
@@ -42,9 +45,10 @@
 (provide 'auto-overlays-compat)
 
 
-(defun auto-overlays-compat-line-number-at-pos (pos)
+(defun auto-overlays-compat-line-number-at-pos (&optional pos)
   "Return (narrowed) buffer line number at position POS.
 \(Defaults to the point.\)"
+  (unless pos (setq pos (point)))
   (1+ (count-lines (point-min) pos))
 )
 
diff --git a/auto-overlays.el b/auto-overlays.el
index 985b63b..058ce1d 100644
--- a/auto-overlays.el
+++ b/auto-overlays.el
@@ -5,7 +5,7 @@
 ;; Copyright (C) 2005 2006 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.6.1
+;; Version: 0.6.2
 ;; Keywords: automatic, overlays
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -30,6 +30,12 @@
 
 ;;; Change Log:
 ;;
+;; Version 0.6.2
+;; * fixed(?) bugs in `auto-o-update-exclusive' that caused it to fail if
+;;   called during a suicide when parentless overlays can exist, and that
+;;   caused it to infinitely recurse if an exclusive overlay partially
+;;   overlapped with its match overlay
+;;
 ;; Version 0.6.1
 ;; * fixed minor bug in `auto-overlay-save-overlays'
 ;;
@@ -913,11 +919,16 @@ The FILE should be generated by 
`auto-overlay-save-overlays'."
             beg end
             (list '(identity auto-overlay-match)
                   (list 'eq 'set-id set-id)
+                  ;; note: parentless overlays are possible if a suicide is
+                  ;; in progress, so need to check overlay has a parent first
+                  '(identity parent)
                   (list (lambda (parent)
                           (null (overlay-get parent 'inactive)))
                         'parent)
                   (list (lambda (pri new) (or (null pri) (< pri new)))
-                        'priority new-priority))))
+                        'priority new-priority))
+            'within))  ; FIXME: this is necessary in some cases, but might
+                       ;        muck up other cases - check
       ;; call appropriate suicide function for each match overlay in list
       (dolist (o overlay-list) (funcall (auto-o-suicide-function o) o)))
      



reply via email to

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