changeset 21023:bac070da6b6d

(load-with-code-conversion): Don't bind enable-multibyte-characters; instead, bind default-enable-multibyte-characters before creating buffer. (after-insert-file-set-buffer-file-coding-system): Use set-buffer-multibyte. Use add-hook to add this to after-insert-file-functions.
author Karl Heuer <kwzh@gnu.org>
date Mon, 02 Mar 1998 20:01:46 +0000
parents 52bc6b672a50
children 396f070a8011
files lisp/international/mule.el
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Mon Mar 02 19:12:51 1998 +0000
+++ b/lisp/international/mule.el	Mon Mar 02 20:01:46 1998 +0000
@@ -45,7 +45,8 @@
     (let* ((buffer
 	    ;; To avoid any autoloading, set default-major-mode to
 	    ;; fundamental-mode.
-	    (let ((default-major-mode 'fundamental-mode))
+	    (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*"))))
@@ -62,8 +63,6 @@
 		(inhibit-file-name-operation nil))
 	    (save-excursion
 	      (set-buffer buffer)
-	      ;; This is buffer-local.
-	      (setq enable-multibyte-characters t)
 	      (insert-file-contents fullname)
 	      ;; Make `kill-buffer' quiet.
 	      (set-buffer-modified-p nil))
@@ -827,15 +826,13 @@
 	  (if (or (eq coding-system 'no-conversion)
 		  (eq (coding-system-type coding-system) 5))
 	      ;; It seems that random 8-bit codes are read.  We had
-	      ;; better edit this buffer without multibyte character
-	      ;; facility.
+	      ;; better edit this buffer without multibyte characters.
 	      (set-buffer-multibyte nil))
 	  (set-buffer-modified-p modified-p))))
   nil)
 
-(setq after-insert-file-functions
-      (cons 'after-insert-file-set-buffer-file-coding-system
-	    after-insert-file-functions))
+(add-hook 'after-insert-file-functions
+	  'after-insert-file-set-buffer-file-coding-system)
 
 ;; The coding-spec and eol-type of coding-system returned is decided
 ;; independently in the following order.