From: Dmitry Gutov Date: Wed, 26 Feb 2014 02:31:27 +0000 (+0200) Subject: * lisp/emacs-lisp/lisp.el (lisp--local-variables): Catch `end-of-file' X-Git-Tag: emacs-24.3.90~357^2~7^2~11 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b2388336fef199304f7050340a91fe559b634ba2;p=emacs.git * lisp/emacs-lisp/lisp.el (lisp--local-variables): Catch `end-of-file' error from `read-from-string'. Fixes: debbugs:16850 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 56ff5b1c506..01017ad7fc2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-02-26 Dmitry Gutov + * emacs-lisp/lisp.el (lisp--local-variables): Catch `end-of-file' + error from `read-from-string'. (Bug#16850) + * emacs-lisp/ert.el (ert-run-tests-interactively): `read' the result of `completing-read' in the interactive form. (Bug#16854) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 03be2f5c1aa..0487515a142 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -719,8 +719,10 @@ considered." (dolist (p (nth 9 ppss)) (push (cdr (syntax-after p)) closer)) (setq closer (apply #'string closer)) - (let* ((sexp (car (read-from-string - (concat txt "lisp--witness--lisp" closer)))) + (let* ((sexp (condition-case nil + (car (read-from-string + (concat txt "lisp--witness--lisp" closer))) + (end-of-file nil))) (macroexpand-advice (lambda (expander form &rest args) (condition-case nil (apply expander form args)