Browse Source

org-element-clock-line-re: Fix Emacs 26 compatibility after e305755b1

* lisp/org-element.el (org-element-clock-line-re): Use Emacs
26-compatible `rx' notation.
Ihor Radchenko 2 years ago
parent
commit
279bee087d
1 changed files with 11 additions and 9 deletions
  1. 11 9
      lisp/org-element.el

+ 11 - 9
lisp/org-element.el

@@ -126,15 +126,17 @@ Key is located in match group 1.")
 Style, if any, is located in match group 1.")
 
 (defconst org-element-clock-line-re
-  (rx line-start (0+ (or ?\t ?\s))
-      "CLOCK: "
-      (regexp org-ts-regexp-inactive)
-      (opt "--"
-           (regexp org-ts-regexp-inactive)
-           (1+ (or ?\t ?\s)) "=>" (1+ (or ?\t ?\s))
-           (1+ digit) ":" digit digit)
-      (0+ (or ?\t ?\s))
-      line-end)
+  (rx-to-string
+   `(seq
+     line-start (0+ (or ?\t ?\s))
+     "CLOCK: "
+     (regexp ,org-ts-regexp-inactive)
+     (opt "--"
+          (regexp ,org-ts-regexp-inactive)
+          (1+ (or ?\t ?\s)) "=>" (1+ (or ?\t ?\s))
+          (1+ digit) ":" digit digit)
+     (0+ (or ?\t ?\s))
+     line-end))
   "Regexp matching a clock line.")
 
 (defconst org-element-comment-string "COMMENT"