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

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

[elpa] externals/code-cells 9500e07f83 15/36: Fix byte-compilation issue


From: ELPA Syncer
Subject: [elpa] externals/code-cells 9500e07f83 15/36: Fix byte-compilation issue
Date: Mon, 28 Feb 2022 15:57:42 -0500 (EST)

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

    Fix byte-compilation issue
---
 code-cells.el | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/code-cells.el b/code-cells.el
index 61424f5d18..9ce6df2d2c 100644
--- a/code-cells.el
+++ b/code-cells.el
@@ -41,7 +41,8 @@
 
 (require 'map)
 (require 'pulse)
-(require 'rx)
+(require 'subr-x)
+(eval-when-compile (require 'rx))
 
 (defgroup code-cells nil
   "Utilities for code split into cells."
@@ -51,21 +52,21 @@
 ;;* Cell navigation
 
 (defcustom code-cells-boundary-markers
-  '((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
-introduces a cell break.
-
-The length of the first capture determines the outline level."
+  (list (rx (* space) "%" (group-n 1 (+ "%")))
+        (rx (group-n 1 (+ "*")))
+        (rx " In[" (* (any space digit)) "]:"))
+  "List of regular expressions specifying cell boundaries.
+They should match immediately after a comment start at the
+beginning of a line.  The length of the first capture determines
+the outline level."
   :type '(repeat sexp))
 
 (defun code-cells-boundary-regexp ()
   "Return a regexp matching comment lines that serve as cell boundary."
-  (rx line-start
-      (+ (syntax comment-start))
-      (eval (cons 'or code-cells-boundary-markers))))
+  (concat (rx line-start (+ (syntax comment-start)))
+          "\\(?:"
+          (string-join code-cells-boundary-markers "\\|")
+          "\\)"))
 
 ;;;###autoload
 (defun code-cells-forward-cell (&optional arg)



reply via email to

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