Skip to content

Commit 5a8ef32

Browse files
committed
fix eval invocation in typescript--re-search-backward to work with lexical scoping
Under lexical scoping variable references won't be found when evaluating the expression, resulting in "eval: Symbol’s value as variable is void: regexp" error.
1 parent 2a58631 commit 5a8ef32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

typescript-mode.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -992,11 +992,11 @@ one at the end of the line with \"let a\"."
992992
(let ((saved-point (point))
993993
(search-expr
994994
(cond ((null count)
995-
'(typescript--re-search-backward-inner regexp bound 1))
995+
`(typescript--re-search-backward-inner ,regexp ,bound 1))
996996
((< count 0)
997-
'(typescript--re-search-forward-inner regexp bound (- count)))
997+
`(typescript--re-search-forward-inner ,regexp ,bound (- ,count)))
998998
((> count 0)
999-
'(typescript--re-search-backward-inner regexp bound count)))))
999+
`(typescript--re-search-backward-inner ,regexp ,bound ,count)))))
10001000
(condition-case err
10011001
(eval search-expr)
10021002
(search-failed

0 commit comments

Comments
 (0)