Skip to content

Commit 2feaf6b

Browse files
committed
fix(reader): handle end of file while processing a buffer
1 parent 9aa8c7c commit 2feaf6b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

elsa.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ tokens."
160160
(elsa-tostring form)
161161
(error-message-string err))))))
162162
;; When not running as language server, just crash on errors.
163-
(while (setq form (elsa-read-form state))
164-
(elsa-analyse-form state form))))
163+
(condition-case nil
164+
(while (setq form (elsa-read-form state))
165+
(elsa-analyse-form state form))
166+
(end-of-file t))))
165167
(unless no-log
166168
(elsa-log
167169
(with-ansi

0 commit comments

Comments
 (0)