branch: externals/code-cells
commit c16c0aa0af2813a6ed332206f9216ccabff513a6
Author: Augusto Stoffel <[email protected]>
Commit: Augusto Stoffel <[email protected]>
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