]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/package.el (package-install-from-archive): Fix last change
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 24 May 2019 16:26:14 +0000 (12:26 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 24 May 2019 16:26:40 +0000 (12:26 -0400)
Don't place the unibyte content of of the downloaded file into
a multibyte buffer.

lisp/emacs-lisp/package.el

index 6b929160950dff6ae7214ce514661eb9f3edb70b..670831d9630b4d0ce68396931ec5e53498d6ce5d 100644 (file)
@@ -1913,9 +1913,12 @@ if all the in-between dependencies are also in PACKAGE-LIST."
            ;; This function will be called after signature checking.
            (lambda (&optional good-sigs)
              ;; Signature checked, unpack now.
-             (with-temp-buffer (insert content)
-                               (let ((save-silently t))
-                                 (package-unpack pkg-desc)))
+             (with-temp-buffer ;FIXME: Just use the previous current-buffer.
+               (set-buffer-multibyte nil)
+               (cl-assert (not (multibyte-string-p content)))
+               (insert content)
+               (let ((save-silently t))
+                 (package-unpack pkg-desc)))
              ;; Here the package has been installed successfully, mark it as
              ;; signed if appropriate.
              (when good-sigs