Skip to content

Commit 8bcc657

Browse files
rlbdvbbatsov
authored andcommitted
Move clojure--let-regexp before first use
Otherwise test-bytecomp fails with: In toplevel form: clojure-mode.el:493:25:Error: reference to free variable `clojure--let-regexp'
1 parent cb7433e commit 8bcc657

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

clojure-mode.el

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,16 @@ val} as of Clojure 1.9.")
486486
(declare-function paredit-close-curly "ext:paredit" t t)
487487
(declare-function paredit-convolute-sexp "ext:paredit")
488488

489+
(defvar clojure--let-regexp
490+
"\(\\(when-let\\|if-let\\|let\\)\\(\\s-*\\|\\[\\)"
491+
"Regexp matching let like expressions, i.e. \"let\", \"when-let\", \"if-let\".
492+
493+
The first match-group is the let expression.
494+
495+
The second match-group is the whitespace or the opening square
496+
bracket if no whitespace between the let expression and the
497+
bracket.")
498+
489499
(defun clojure--replace-let-bindings-and-indent (&rest _)
490500
"Replace let bindings and indent."
491501
(save-excursion
@@ -2542,16 +2552,6 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-cycle-if"
25422552

25432553
;;; let related stuff
25442554

2545-
(defvar clojure--let-regexp
2546-
"\(\\(when-let\\|if-let\\|let\\)\\(\\s-*\\|\\[\\)"
2547-
"Regexp matching let like expressions, i.e. \"let\", \"when-let\", \"if-let\".
2548-
2549-
The first match-group is the let expression.
2550-
2551-
The second match-group is the whitespace or the opening square
2552-
bracket if no whitespace between the let expression and the
2553-
bracket.")
2554-
25552555
(defun clojure--goto-let ()
25562556
"Go to the beginning of the nearest let form."
25572557
(when (clojure--in-string-p)

0 commit comments

Comments
 (0)