changeset 21675:f000ba659241

(load-with-code-conversion): Undo previous change. Instead, pass the UNIBYTE arg to eval-buffer.
author Richard M. Stallman <rms@gnu.org>
date Mon, 20 Apr 1998 07:08:17 +0000
parents 0fbfcd0c411d
children 81bbd2c2724a
files lisp/international/mule.el
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Mon Apr 20 06:37:57 1998 +0000
+++ b/lisp/international/mule.el	Mon Apr 20 07:08:17 1998 +0000
@@ -45,7 +45,12 @@
     (let* ((buffer
 	    ;; To avoid any autoloading, set default-major-mode to
 	    ;; fundamental-mode.
-	    (let ((default-major-mode 'fundamental-mode))
+	    ;; So that we don't get completely screwed if the
+	    ;; file is encoded in some complicated character set,
+	    ;; read it with real decoding, as a multibyte buffer,
+	    ;; even if this is a --unibyte Emacs session.
+	    (let ((default-major-mode 'fundamental-mode)
+		  (default-enable-multibyte-characters t))
 	      ;; We can't use `generate-new-buffer' because files.el
 	      ;; is not yet loaded.
 	      (get-buffer-create (generate-new-buffer-name " *load*"))))
@@ -66,7 +71,11 @@
 	      ;; Make `kill-buffer' quiet.
 	      (set-buffer-modified-p nil))
 	    ;; Have the original buffer current while we eval.
-	    (eval-buffer buffer nil file))
+	    (eval-buffer buffer nil file
+			 ;; If this Emacs is running with --unibyte,
+			 ;; convert multibyte strings to unibyte
+			 ;; after reading them.
+			 (not default-enable-multibyte-characters)))
 	(let (kill-buffer-hook kill-buffer-query-functions)
 	  (kill-buffer buffer)))
       (let ((hook (assoc file after-load-alist)))