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

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

[elpa] externals/code-cells c16c0aa0af 13/36: Use named groups in altern


From: ELPA Syncer
Subject: [elpa] externals/code-cells c16c0aa0af 13/36: Use named groups in alternative regexp branches
Date: Mon, 28 Feb 2022 15:57:42 -0500 (EST)

branch: externals/code-cells
commit c16c0aa0af2813a6ed332206f9216ccabff513a6
Author: Augusto Stoffel <astoff@users.noreply.github.com>
Commit: Augusto Stoffel <astoff@users.noreply.github.com>

    Use named groups in alternative regexp branches
---
 cells.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cells.el b/cells.el
index f7f1442b32..b5905edd64 100644
--- a/cells.el
+++ b/cells.el
@@ -51,8 +51,8 @@
 ;;* Cell navigation
 
 (defcustom cells-boundary-markers
-  '((seq (* space) "%" (group (+ "%")))
-    (group (+ "*"))
+  '((seq (* space) "%" (group-n 1 (+ "%")))
+    (group-n 1 (+ "*"))
     (seq " In[" (* (any space digit)) "]:"))
   "A list of regular expressions in sexp form (see `rx').
 Each of regexp should match the content of a comment line which
@@ -175,7 +175,7 @@ cell level."
 
 (defun cells--font-lock-keywords ()
   "Font lock keywords to highlight cell boundaries."
-  `((,(concat "\\(" (cells-boundary-regexp) "\\).*\n")
+  `((,(rx (regexp (cells-boundary-regexp)) (* any) "\n")
      0 'cells-header-line append)))
 
 ;;;###autoload



reply via email to

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