aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov2004-09-02 09:45:31 +0000
committerJuri Linkov2004-09-02 09:45:31 +0000
commite4aa3c949789dbc004c6a90f49c9bd5b8b157e36 (patch)
treeee53ecfded2142da48c215022c55b38351bd48b4 /lisp
parent017c959d5dcf46bf7b7a81974442987042c439fe (diff)
downloademacs-e4aa3c949789dbc004c6a90f49c9bd5b8b157e36.tar.gz
emacs-e4aa3c949789dbc004c6a90f49c9bd5b8b157e36.zip
(compilation-buffer-name): Compare major
mode with second element of compilation-arguments instead of third to reflect latest changes in compilation-arguments structure. (recompile): Use global variable `compilation-directory' to get recent compilation directory only when `recompile' is invoked NOT in the compilation buffer. Otherwise, use `default-directory' of the compilation buffer.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/compile.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index b890f542b8d..7a0aa42faff 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -458,9 +458,9 @@ starting the compilation process.")
458 :version "21.4") 458 :version "21.4")
459 459
460(defface compilation-info-face 460(defface compilation-info-face
461 '((((class color) (min-colors 16) (background light)) 461 '((((class color) (min-colors 16) (background light))
462 (:foreground "Green3" :weight bold)) 462 (:foreground "Green3" :weight bold))
463 (((class color) (min-colors 16) (background dark)) 463 (((class color) (min-colors 16) (background dark))
464 (:foreground "Green" :weight bold)) 464 (:foreground "Green" :weight bold))
465 (((class color)) (:foreground "green" :weight bold)) 465 (((class color)) (:foreground "green" :weight bold))
466 (t (:weight bold))) 466 (t (:weight bold)))
@@ -789,7 +789,10 @@ If this is run in a Compilation mode buffer, re-use the arguments from the
789original use. Otherwise, recompile using `compile-command'." 789original use. Otherwise, recompile using `compile-command'."
790 (interactive) 790 (interactive)
791 (save-some-buffers (not compilation-ask-about-save) nil) 791 (save-some-buffers (not compilation-ask-about-save) nil)
792 (let ((default-directory (or compilation-directory default-directory))) 792 (let ((default-directory
793 (or (and (not (eq major-mode (nth 1 compilation-arguments)))
794 compilation-directory)
795 default-directory)))
793 (apply 'compilation-start (or compilation-arguments 796 (apply 'compilation-start (or compilation-arguments
794 `(,(eval compile-command)))))) 797 `(,(eval compile-command))))))
795 798
@@ -816,8 +819,7 @@ Otherwise, construct a buffer name from MODE-NAME."
816 (funcall name-function mode-name)) 819 (funcall name-function mode-name))
817 (compilation-buffer-name-function 820 (compilation-buffer-name-function
818 (funcall compilation-buffer-name-function mode-name)) 821 (funcall compilation-buffer-name-function mode-name))
819 ((and (eq major-mode 'compilation-mode) 822 ((eq major-mode (nth 1 compilation-arguments))
820 (equal mode-name (nth 2 compilation-arguments)))
821 (buffer-name)) 823 (buffer-name))
822 (t 824 (t
823 (concat "*" (downcase mode-name) "*")))) 825 (concat "*" (downcase mode-name) "*"))))
@@ -1522,7 +1524,7 @@ If nil, don't scroll the compilation output window."
1522 1524
1523(defun compilation-goto-locus (msg mk end-mk) 1525(defun compilation-goto-locus (msg mk end-mk)
1524 "Jump to an error corresponding to MSG at MK. 1526 "Jump to an error corresponding to MSG at MK.
1525All arguments are markers. If END-MK is non nil, mark is set there." 1527All arguments are markers. If END-MK is non-nil, mark is set there."
1526 (if (eq (window-buffer (selected-window)) 1528 (if (eq (window-buffer (selected-window))
1527 (marker-buffer msg)) 1529 (marker-buffer msg))
1528 ;; If the compilation buffer window is selected, 1530 ;; If the compilation buffer window is selected,