summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-12-30 18:52:14 +0000
committerRichard M. Stallman <rms@gnu.org>1996-12-30 18:52:14 +0000
commit4541102ac0cec8583a72c4f8ad5b0a9d447f81b9 (patch)
tree6ec95a8edcfa2a5f3409ea49de4df5339d0e03b1
parente051a0f979f6d3674691937043cbee024d0467f7 (diff)
downloademacs-4541102ac0cec8583a72c4f8ad5b0a9d447f81b9.tar.gz
(byte-compile-file): Set default-directory in compiler input buffer.
-rw-r--r--lisp/emacs-lisp/bytecomp.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index a4310dc2cbd..1ffd3cae2ca 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -10,7 +10,7 @@
;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler.
-(defconst byte-compile-version "$Revision: 2.23 $")
+(defconst byte-compile-version "$Revision: 2.24 $")
;; This file is part of GNU Emacs.
@@ -1249,7 +1249,9 @@ With prefix arg (noninteractively: 2nd arg), load the file after compiling."
(default-major-mode 'emacs-lisp-mode)
(enable-local-eval nil))
(normal-mode)
- (setq filename buffer-file-name)))
+ (setq filename buffer-file-name))
+ ;; Set the default directory, in case an eval-when-compile uses it.
+ (setq default-directory (file-name-directory filename)))
(setq byte-compiler-error-flag nil)
;; It is important that input-buffer not be current at this call,
;; so that the value of point set in input-buffer