summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1999-04-06 19:56:24 +0000
committerRichard M. Stallman <rms@gnu.org>1999-04-06 19:56:24 +0000
commit7a28e3b1f432b20da317721ddc696d240191b2d0 (patch)
tree696388c4fdde0127611e58372a41699f9a71d67d /lisp/emacs-lisp
parent509064c5dd142ddaa4d280c516ae06aa38253662 (diff)
downloademacs-7a28e3b1f432b20da317721ddc696d240191b2d0.tar.gz
emacs-7a28e3b1f432b20da317721ddc696d240191b2d0.tar.bz2
emacs-7a28e3b1f432b20da317721ddc696d240191b2d0.zip
(byte-compile-file): Clear buffer-file-coding-system. If the coding
system used is raw-text, etc., make the *Compiler Input* buffer unibyte.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index ce71b6589c3..d97f9bd365f 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1,6 +1,6 @@
;;; bytecomp.el --- compilation of Lisp code into byte code.
-;; Copyright (C) 1985, 1986, 1987, 1992, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998 Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
@@ -9,7 +9,7 @@
;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler.
-(defconst byte-compile-version "$Revision: 2.54 $")
+(defconst byte-compile-version "$Revision: 2.55 $")
;; This file is part of GNU Emacs.
@@ -1282,10 +1282,18 @@ The value is t if there were no errors, nil if errors."
(setq input-buffer (get-buffer-create " *Compiler Input*"))
(set-buffer input-buffer)
(erase-buffer)
+ (setq buffer-file-coding-system nil)
;; Always compile an Emacs Lisp file as multibyte
;; unless the file itself forces unibyte with -*-coding: raw-text;-*-x
(set-buffer-multibyte t)
(insert-file-contents filename)
+ ;; Mimic the way after-insert-file-set-buffer-file-coding-system
+ ;; can make the buffer unibyte when visiting this file.
+ (when (or (eq last-coding-system-used 'no-conversion)
+ (eq (coding-system-type last-coding-system-used) 5))
+ ;; For coding systems no-conversion and raw-text...,
+ ;; edit the buffer as unibyte.
+ (set-buffer-multibyte nil))
;; Run hooks including the uncompression hook.
;; If they change the file name, then change it for the output also.
(let ((buffer-file-name filename)