Skip to content

Commit 9de9a3c

Browse files
committed
Remove when-let* for older versions of emacs
1 parent f831ff5 commit 9de9a3c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

evil-common.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,12 +2996,12 @@ beg or end are inside a sequence of composed characters, adjust
29962996
the positions to be outside of this sequence."
29972997
(let ((beg (evil-normalize-position beg))
29982998
(end (evil-normalize-position end)))
2999-
(when-let* ((comp (find-composition beg))
3000-
(valid (nth 2 comp)))
3001-
(setq beg (nth 0 comp)))
3002-
(when-let* ((comp (find-composition end))
3003-
(valid (nth 2 comp)))
3004-
(setq end (nth 1 comp)))
2999+
(let ((comp (find-composition beg)))
3000+
(when (and (listp comp) (nth 2 comp)) ; valid composition
3001+
(setq beg (nth 0 comp))))
3002+
(let ((comp (find-composition end)))
3003+
(when (and (listp comp) (nth 2 comp))
3004+
(setq end (nth 1 comp))))
30053005
(when (and (numberp beg) (numberp end))
30063006
(append (list (min beg end) (max beg end))
30073007
(when (evil-type-p type)

0 commit comments

Comments
 (0)