From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: recompile uses wrong buffer.. hint
Date: Mon, 07 Jun 2004 15:36:48 +0300 [thread overview]
Message-ID: <87ekortuhr.fsf@mail.jurta.org> (raw)
In-Reply-To: <87lliz90o3.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 07 Jun 2004 12:29:00 +0300")
> ((eq major-mode (nth 1 compilation-arguments))
> (buffer-name))
I think exactly the same condition should be used in `recompile'
to get the right directory when invoked in the compilation buffer:
Index: lisp/progmodes/compile.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.320
diff -u -r1.320 compile.el
--- lisp/progmodes/compile.el 28 May 2004 21:11:41 -0000 1.320
+++ lisp/progmodes/compile.el 7 Jun 2004 12:20:15 -0000
@@ -787,7 +787,10 @@
original use. Otherwise, recompile using `compile-command'."
(interactive)
(save-some-buffers (not compilation-ask-about-save) nil)
- (let ((default-directory (or compilation-directory default-directory)))
+ (let ((default-directory
+ (or (and (not (eq major-mode (nth 1 compilation-arguments)))
+ compilation-directory)
+ default-directory)))
(apply 'compilation-start (or compilation-arguments
`(,(eval compile-command))))))
@@ -814,8 +817,7 @@
(funcall name-function mode-name))
(compilation-buffer-name-function
(funcall compilation-buffer-name-function mode-name))
- ((and (eq major-mode 'compilation-mode)
- (equal mode-name (nth 2 compilation-arguments)))
+ ((eq major-mode (nth 1 compilation-arguments))
(buffer-name))
(t
(concat "*" (downcase mode-name) "*"))))
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2004-06-07 12:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-07 8:40 recompile uses wrong buffer.. hint Stephan Stahl
2004-06-07 9:29 ` Juri Linkov
2004-06-07 12:36 ` Juri Linkov [this message]
2004-06-09 19:52 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ekortuhr.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).