Function: package-read-from-string
package-read-from-string is a byte-compiled function defined in
package.el.gz.
Signature
(package-read-from-string STR)
Documentation
Read a Lisp expression from STR.
Signal an error if the entire string was not used.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
;;;; Inferring package from current buffer
(defun package-read-from-string (str)
"Read a Lisp expression from STR.
Signal an error if the entire string was not used."
(pcase-let ((`(,expr . ,offset) (read-from-string str)))
(condition-case ()
;; The call to `ignore' suppresses a compiler warning.
(progn (ignore (read-from-string str offset))
(error "Can't read whole string"))
(end-of-file expr))))