Skip to content

Commit

Permalink
fix: use when-let consistently to avoid macroexpansion errors
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell authored Nov 11, 2023
1 parent 67fd542 commit 1e21640
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions puni.el
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ of `char-syntax'."

(defun puni--backward-same-syntax (&optional bound)
"Backward version of `puni--forward-same-syntax'."
(when-let (syntax (puni--syntax-char-after (1- (point))))
(when-let ((syntax (puni--syntax-char-after (1- (point)))))
(puni--backward-syntax (char-to-string syntax) bound)))

;;;;; Basic move: symbol
Expand Down Expand Up @@ -1912,8 +1912,8 @@ whole buffer is the list around point."
(funcall find-bigger-bounds #'puni-bounds-of-sexp-at-point)))
(bounds-of-list-around
(lambda ()
(when-let (bounds (funcall find-bigger-bounds
#'puni-bounds-of-list-around-point))
(when-let ((bounds (funcall find-bigger-bounds
#'puni-bounds-of-list-around-point)))
;; Don't select blanks around the list.
(save-excursion
(goto-char (car bounds))
Expand Down

0 comments on commit 1e21640

Please sign in to comment.