Skip to content

Commit b1c71f0

Browse files
committed
Fix a few warnings from uses of looking-back
1 parent 7bc8748 commit b1c71f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clojure-mode.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,8 +1619,8 @@ Point must be between the opening paren and the -> symbol."
16191619
(forward-sexp)
16201620
(down-list -1)
16211621
(backward-sexp 2) ;; the last sexp, the threading macro
1622-
(when (looking-back "(\\s-*")
1623-
(backward-up-list)) ;; and the paren
1622+
(when (looking-back "(\\s-*" (line-beginning-position))
1623+
(backward-up-list)) ;; and the paren
16241624
(= beg (point)))))
16251625

16261626
;;;###autoload
@@ -1668,7 +1668,7 @@ Return nil if there are no more levels to unwind."
16681668
(forward-sexp 2)
16691669
(down-list -1)
16701670
(backward-sexp)
1671-
(unless (looking-back "(")
1671+
(unless (eq (char-before) ?\()
16721672
(let ((contents (clojure-delete-and-extract-sexp)))
16731673
(just-one-space 0)
16741674
(backward-up-list)
@@ -1678,7 +1678,7 @@ Return nil if there are no more levels to unwind."
16781678
;; cljr #255 Fix dangling parens
16791679
(backward-up-list)
16801680
(forward-sexp)
1681-
(when (looking-back "^\\s-*)+\\s-*")
1681+
(when (looking-back "^\\s-*)+\\s-*" (line-beginning-position))
16821682
(join-line))
16831683
t)))
16841684

0 commit comments

Comments
 (0)