aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/package.el17
1 files changed, 6 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 61bff5cfbca..f8b4cc888dd 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -961,17 +961,12 @@ This assumes that `pkg-desc' has already been activated with
961(defun package-read-from-string (str) 961(defun package-read-from-string (str)
962 "Read a Lisp expression from STR. 962 "Read a Lisp expression from STR.
963Signal an error if the entire string was not used." 963Signal an error if the entire string was not used."
964 (let* ((read-data (read-from-string str)) 964 (pcase-let ((`(,expr . ,offset) (read-from-string str)))
965 (more-left 965 (condition-case ()
966 (condition-case nil 966 ;; The call to `ignore' suppresses a compiler warning.
967 ;; The call to `ignore' suppresses a compiler warning. 967 (progn (ignore (read-from-string str offset))
968 (progn (ignore (read-from-string 968 (error "Can't read whole string"))
969 (substring str (cdr read-data)))) 969 (end-of-file expr))))
970 t)
971 (end-of-file nil))))
972 (if more-left
973 (error "Can't read whole string")
974 (car read-data))))
975 970
976(defun package--prepare-dependencies (deps) 971(defun package--prepare-dependencies (deps)
977 "Turn DEPS into an acceptable list of dependencies. 972 "Turn DEPS into an acceptable list of dependencies.