]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/lisp.el (lisp--local-variables): Catch `end-of-file'
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 26 Feb 2014 02:31:27 +0000 (04:31 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 26 Feb 2014 02:31:27 +0000 (04:31 +0200)
error from `read-from-string'.

Fixes: debbugs:16850
lisp/ChangeLog
lisp/emacs-lisp/lisp.el

index 56ff5b1c506163e98405383207148003b82f4c9d..01017ad7fc2af8ad4350e0304135e799aa5113dd 100644 (file)
@@ -1,5 +1,8 @@
 2014-02-26  Dmitry Gutov  <dgutov@yandex.ru>
 
+       * 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)
 
index 03be2f5c1aae51d74a03454604e4ae717d96d426..0487515a142f79e7cc0d621f69fc24d3dbe0af30 100644 (file)
@@ -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)