@@ -2149,11 +2149,15 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-cycle-privacy"
2149
2149
(interactive )
2150
2150
(clojure--convert-collection " #{" " }" ))
2151
2151
2152
+ (defun clojure--in-string-p ()
2153
+ " Check whether the point is currently in a string."
2154
+ (nth 3 (syntax-ppss )))
2155
+
2152
2156
(defun clojure--goto-if ()
2153
2157
" Find the first surrounding if or if-not expression."
2154
- (when (in-string-p )
2158
+ (when (clojure-- in-string-p)
2155
2159
(while (or (not (looking-at " (" ))
2156
- (in-string-p ))
2160
+ (clojure-- in-string-p))
2157
2161
(backward-char )))
2158
2162
(while (not (looking-at " \\ ((if \\ )\\ |\\ ((if-not \\ )" ))
2159
2163
(condition-case nil
@@ -2183,9 +2187,9 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-cycle-if"
2183
2187
; ; TODO: Remove code duplication with `clojure--goto-if' .
2184
2188
(defun clojure--goto-when ()
2185
2189
" Find the first surrounding when or when-not expression."
2186
- (when (in-string-p )
2190
+ (when (clojure-- in-string-p)
2187
2191
(while (or (not (looking-at " (" ))
2188
- (in-string-p ))
2192
+ (clojure-- in-string-p))
2189
2193
(backward-char )))
2190
2194
(while (not (looking-at " \\ ((when \\ )\\ |\\ ((when-not \\ )" ))
2191
2195
(condition-case nil
@@ -2236,9 +2240,9 @@ bracket.")
2236
2240
2237
2241
(defun clojure--goto-let ()
2238
2242
" Go to the beginning of the nearest let form."
2239
- (when (in-string-p )
2243
+ (when (clojure-- in-string-p)
2240
2244
(while (or (not (looking-at " (" ))
2241
- (in-string-p ))
2245
+ (clojure-- in-string-p))
2242
2246
(backward-char )))
2243
2247
(ignore-errors
2244
2248
(while (not (looking-at clojure--let-regexp))
0 commit comments