Mercurial > emacs
diff lisp/progmodes/compile.el @ 90988:492971a3f31f unicode-xft-base
Merge from emacs--devo--0
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
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 24 Jul 2007 01:23:55 +0000 |
parents | a66921565bcb af49557163c6 |
children | f55f9811f5d7 |
line wrap: on
line diff
--- a/lisp/progmodes/compile.el Mon Jul 23 05:39:31 2007 +0000 +++ b/lisp/progmodes/compile.el Tue Jul 24 01:23:55 2007 +0000 @@ -607,7 +607,9 @@ (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 @@ (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 @@ 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 @@ (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)