branch: externals/denote-sequence
commit 052aa874ec96767625998fe76747702ec10d06c6
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Simplify the regexp match in denote-sequence-alphanumeric-delimited-p
---
 denote-sequence.el | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/denote-sequence.el b/denote-sequence.el
index 14c6c09460..023e96e1c4 100644
--- a/denote-sequence.el
+++ b/denote-sequence.el
@@ -117,13 +117,9 @@ Refer to the `denote-sequence-scheme' for the details."
                (not (denote-sequence-numeric-p sequence)))
       (let ((start 0)
             (strings nil))
-        (while (string-match 
"\\(?1:[0-9]+\\)[[:alpha:]]\\|\\(?2:[[:alpha:]]+\\)[0-9]*" sequence start)
-          (if-let* ((match (match-string 1 sequence)))
-              (progn
-                (setq start (match-end 1))
-                (push match strings))
-            (push (match-string 2 sequence) strings)
-            (setq start (match-end 2))))
+        (while (string-match "[0-9]+\\|[[:alpha:]]+" sequence start)
+            (push (match-string 0 sequence) strings)
+            (setq start (match-end 0)))
         (catch 'error
           (let ((last-type nil)
                 (current-type nil))

Reply via email to