Skip to content

Commit

Permalink
can't use when-let either
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeochoa committed Apr 22, 2017
1 parent 045df71 commit b41de6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rjsx-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -813,10 +813,10 @@ slash and inserts a matching end-tag."
"Prompt for a new name and modify the tag at point.
NEW-NAME is the name to give the tag."
(interactive "sNew tag name: ")
(let ((tag (rjsx--tag-at-point)))
(let ((tag (rjsx--tag-at-point)) closer)
(if tag
(let* ((head (rjsx-node-name tag))
(tail (when-let ((closer (rjsx-node-closing-tag tag))) (rjsx-closing-tag-name closer)))
(tail (when (setq closer (rjsx-node-closing-tag tag)) (rjsx-closing-tag-name closer)))
beg end)
(dolist (part (if tail (list tail head) (list head)))
(setq beg (js2-node-abs-pos part)
Expand Down

0 comments on commit b41de6c

Please sign in to comment.