comparison lisp/emacs-lisp/bytecomp.el @ 16788:ffb387a3d054

(byte-compile-file): Set default-directory in compiler input buffer.
author Richard M. Stallman <rms@gnu.org>
date Mon, 30 Dec 1996 18:52:14 +0000
parents b1e4c26fc85c
children 07144e5d208a
comparison
equal deleted inserted replaced
16787:3ad557e686b9 16788:ffb387a3d054
8 8
9 ;; Subsequently modified by RMS. 9 ;; Subsequently modified by RMS.
10 10
11 ;;; This version incorporates changes up to version 2.10 of the 11 ;;; This version incorporates changes up to version 2.10 of the
12 ;;; Zawinski-Furuseth compiler. 12 ;;; Zawinski-Furuseth compiler.
13 (defconst byte-compile-version "$Revision: 2.23 $") 13 (defconst byte-compile-version "$Revision: 2.24 $")
14 14
15 ;; This file is part of GNU Emacs. 15 ;; This file is part of GNU Emacs.
16 16
17 ;; GNU Emacs is free software; you can redistribute it and/or modify 17 ;; GNU Emacs is free software; you can redistribute it and/or modify
18 ;; it under the terms of the GNU General Public License as published by 18 ;; it under the terms of the GNU General Public License as published by
1247 ;; If they change the file name, then change it for the output also. 1247 ;; If they change the file name, then change it for the output also.
1248 (let ((buffer-file-name filename) 1248 (let ((buffer-file-name filename)
1249 (default-major-mode 'emacs-lisp-mode) 1249 (default-major-mode 'emacs-lisp-mode)
1250 (enable-local-eval nil)) 1250 (enable-local-eval nil))
1251 (normal-mode) 1251 (normal-mode)
1252 (setq filename buffer-file-name))) 1252 (setq filename buffer-file-name))
1253 ;; Set the default directory, in case an eval-when-compile uses it.
1254 (setq default-directory (file-name-directory filename)))
1253 (setq byte-compiler-error-flag nil) 1255 (setq byte-compiler-error-flag nil)
1254 ;; It is important that input-buffer not be current at this call, 1256 ;; It is important that input-buffer not be current at this call,
1255 ;; so that the value of point set in input-buffer 1257 ;; so that the value of point set in input-buffer
1256 ;; within byte-compile-from-buffer lingers in that buffer. 1258 ;; within byte-compile-from-buffer lingers in that buffer.
1257 (setq output-buffer (byte-compile-from-buffer input-buffer filename)) 1259 (setq output-buffer (byte-compile-from-buffer input-buffer filename))