changeset 23860:2ce75856e89f

(load-with-code-conversion): If the loaded file was inserted with no-conversion or raw-text coding system, make the buffer unibyte.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 10 Dec 1998 13:37:02 +0000
parents b2aa39f6d923
children d2ffab783280
files lisp/international/mule.el
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Thu Dec 10 06:41:00 1998 +0000
+++ b/lisp/international/mule.el	Thu Dec 10 13:37:02 1998 +0000
@@ -69,6 +69,14 @@
 	    (save-excursion
 	      (set-buffer buffer)
 	      (insert-file-contents fullname)
+	      ;; If the loaded file was inserted with no-conversion or
+	      ;; raw-text coding system, make the buffer unibyte.
+	      ;; Otherwise, eval-buffer might try to interpret random
+	      ;; binary junk as multibyte characters.
+	      (if (and enable-multibyte-characters
+		       (or (eq (coding-system-type last-coding-system-used) 5)
+			   (eq last-coding-system-used 'no-conversion)))
+		  (set-buffer-multibyte nil))
 	      ;; Make `kill-buffer' quiet.
 	      (set-buffer-modified-p nil))
 	    ;; Have the original buffer current while we eval.