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

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

[elpa] externals/auto-overlays 36efcfd 89/93: Handle empty group in auto


From: Stefan Monnier
Subject: [elpa] externals/auto-overlays 36efcfd 89/93: Handle empty group in auto-o-regexp-match.
Date: Mon, 14 Dec 2020 13:00:44 -0500 (EST)

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

    Handle empty group in auto-o-regexp-match.
---
 auto-overlays.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/auto-overlays.el b/auto-overlays.el
index a977854..d83c591 100644
--- a/auto-overlays.el
+++ b/auto-overlays.el
@@ -365,8 +365,7 @@ Comparison is done with `eq'."
              (overlay-end o-match))))
     (if (null n) str
       (let ((g (auto-o-group o-match n)))
-       (when g
-         (string-match (auto-o-regexp o-match) str)
+       (when (and g (string-match (auto-o-regexp o-match) str))
          (match-string g str))))))
 
 (defun auto-o-key-value (o-match key)
@@ -1528,7 +1527,7 @@ overlays were saved."
                  (when (or (null definition-ids)
                            (memq definition-id definition-ids))
                    (pop def)
-                   
+
                    ;; check all regexps for current definition
                    (dotimes (rank (length def))
                      (setq regexp-id (car (nth rank def)))



reply via email to

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