]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid loading 'rx' at runtime in 'lua-ts-mode'
authorjohn muhl <jm@pub.pink>
Sat, 23 Nov 2024 20:08:21 +0000 (14:08 -0600)
committerEshel Yaron <me@eshelyaron.com>
Wed, 27 Nov 2024 19:53:55 +0000 (20:53 +0100)
* lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua):
Replace 'rx-to-string' and substitution with 'rx' and 'literal'.
(Bug#74499)

(cherry picked from commit e71d714a815e1088f8cfe946b1e431356ec85b24)

lisp/progmodes/lua-ts-mode.el

index f88fe0e49afd24274d3829f42d0ad18638fb9779..828636f359d2a0efd3ae6ab6df6bd1bba9df81d3 100644 (file)
@@ -659,9 +659,9 @@ Calls REPORT-FN directly."
         (setq-local comint-input-ignoredups t
                     comint-input-ring-file-name lua-ts-inferior-history
                     comint-prompt-read-only t
-                    comint-prompt-regexp (rx-to-string `(: bol
-                                                           ,lua-ts-inferior-prompt
-                                                           (1+ space))))
+                    comint-prompt-regexp (rx bol
+                                             (literal lua-ts-inferior-prompt)
+                                             (1+ space)))
         (comint-read-input-ring t)
         (add-hook 'comint-preoutput-filter-functions
                   (lambda (string)
@@ -672,11 +672,11 @@ Calls REPORT-FN directly."
                        ;; accumulate in the output when sending regions
                        ;; to the inferior process.
                        (replace-regexp-in-string
-                        (rx-to-string `(: bol
-                                          (* ,lua-ts-inferior-prompt
-                                             (? ,lua-ts-inferior-prompt)
-                                             (1+ space))
-                                          (group (* nonl))))
+                        (rx bol
+                            (* (literal lua-ts-inferior-prompt)
+                               (? (literal lua-ts-inferior-prompt))
+                               (1+ space))
+                            (group (* nonl)))
                         "\\1" string)
                        ;; Re-add the prompt for the next line.
                        lua-ts-inferior-prompt " ")))