diff options
| author | Dmitry Gutov | 2014-02-26 04:31:27 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2014-02-26 04:31:27 +0200 |
| commit | b2388336fef199304f7050340a91fe559b634ba2 (patch) | |
| tree | 859711d8a58955949a8b1767d20eee31d74cf6cc | |
| parent | 40ff7f86b6e030763327fd306702ba0928e5b09e (diff) | |
| download | emacs-b2388336fef199304f7050340a91fe559b634ba2.tar.gz emacs-b2388336fef199304f7050340a91fe559b634ba2.zip | |
* lisp/emacs-lisp/lisp.el (lisp--local-variables): Catch `end-of-file'
error from `read-from-string'.
Fixes: debbugs:16850
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 56ff5b1c506..01017ad7fc2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2014-02-26 Dmitry Gutov <dgutov@yandex.ru> | 1 | 2014-02-26 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 2 | ||
| 3 | * emacs-lisp/lisp.el (lisp--local-variables): Catch `end-of-file' | ||
| 4 | error from `read-from-string'. (Bug#16850) | ||
| 5 | |||
| 3 | * emacs-lisp/ert.el (ert-run-tests-interactively): `read' the | 6 | * emacs-lisp/ert.el (ert-run-tests-interactively): `read' the |
| 4 | result of `completing-read' in the interactive form. (Bug#16854) | 7 | result of `completing-read' in the interactive form. (Bug#16854) |
| 5 | 8 | ||
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." | |||
| 719 | (dolist (p (nth 9 ppss)) | 719 | (dolist (p (nth 9 ppss)) |
| 720 | (push (cdr (syntax-after p)) closer)) | 720 | (push (cdr (syntax-after p)) closer)) |
| 721 | (setq closer (apply #'string closer)) | 721 | (setq closer (apply #'string closer)) |
| 722 | (let* ((sexp (car (read-from-string | 722 | (let* ((sexp (condition-case nil |
| 723 | (concat txt "lisp--witness--lisp" closer)))) | 723 | (car (read-from-string |
| 724 | (concat txt "lisp--witness--lisp" closer))) | ||
| 725 | (end-of-file nil))) | ||
| 724 | (macroexpand-advice (lambda (expander form &rest args) | 726 | (macroexpand-advice (lambda (expander form &rest args) |
| 725 | (condition-case nil | 727 | (condition-case nil |
| 726 | (apply expander form args) | 728 | (apply expander form args) |