diff options
author | Miles Bader <miles@gnu.org> | 2007-07-24 01:23:55 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-07-24 01:23:55 +0000 |
commit | 40f9398cdba874aa72fd1828534110caa34702be (patch) | |
tree | ba7af35a2e0a913ccb78095d130ec695e6bfeb97 /lisp/progmodes/compile.el | |
parent | 22110b82771c73e38e4c637b90c5d01da3671c24 (diff) | |
parent | ccb0797a191047816dae47b2e0e7e751027bd0e8 (diff) | |
download | emacs-unicode-xft-base.tar.gz |
Merge from emacs--devo--0unicode-xft-base
Patches applied:
* emacs--devo--0 (patch 816-823)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 59-69)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 237-238)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-235
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r-- | lisp/progmodes/compile.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 94def936fb9..0c57e6f55b1 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -607,7 +607,9 @@ Faces `compilation-error-face', `compilation-warning-face', (defcustom compilation-auto-jump-to-first-error nil "If non-nil, automatically jump to the first error after `compile'." - :type 'boolean) + :type 'boolean + :group 'compilation + :version "23.1") (defvar compilation-auto-jump-to-next nil "If non-nil, automatically jump to the next error encountered.") @@ -934,7 +936,7 @@ to a function that generates a unique name." (unless (equal command (eval compile-command)) (setq compile-command command)) (save-some-buffers (not compilation-ask-about-save) nil) - (setq compilation-directory default-directory) + (setq-default compilation-directory default-directory) (compilation-start command comint)) ;; run compile with the default command line @@ -944,10 +946,7 @@ If this is run in a Compilation mode buffer, re-use the arguments from the original use. Otherwise, recompile using `compile-command'." (interactive) (save-some-buffers (not compilation-ask-about-save) nil) - (let ((default-directory - (or (and (not (eq major-mode (nth 1 compilation-arguments))) - compilation-directory) - default-directory))) + (let ((default-directory (or compilation-directory default-directory))) (apply 'compilation-start (or compilation-arguments `(,(eval compile-command)))))) @@ -1042,6 +1041,10 @@ Returns the compilation buffer created." (buffer-disable-undo (current-buffer)) ;; first transfer directory from where M-x compile was called (setq default-directory thisdir) + ;; Remember the original dir, so we can use it when we recompile. + ;; default-directory' can't be used reliably for that because it may be + ;; affected by the special handling of "cd ...;". + (set (make-local-variable 'compilation-directory) thisdir) ;; Make compilation buffer read-only. The filter can still write it. ;; Clear out the compilation buffer. (let ((inhibit-read-only t) |