all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: compilation-last-buffer and compilation-minor-mode
Date: Mon, 20 Mar 2006 16:46:22 -0500	[thread overview]
Message-ID: <jwv4q1spzi2.fsf-monnier+emacs@gnu.org> (raw)


In Emacs-21, calling compilation-minor-mode used to set
compilation-last-buffer to the current-buffer.  In Emacs-CVS this is not the
case any more.  The change that causes this is:

2004-04-21  Teodor Zlatanov  <tzz@lifelogs.com>

	* simple.el (next-error-last-buffer, next-error-function):
	New variables for the next-error framework.
	(next-error-buffer-p): New function.
	(next-error-find-buffer): Generalize compilation-find-buffer.
	(next-error, previous-error, first-error, next-error-no-select)
	(previous-error-no-select): Move from compile.el.

	* replace.el (occur-next-error, occur-1): Hook into the next-error
	framework.

	* progmodes/compile.el (compilation-start):
	Set next-error-last-buffer so next-error knows where to jump.
	(compilation-setup): Set the buffer-local variable
	next-error-function to 'compilation-next-error-function.
	(compilation-buffer-p, compilation-buffer-internal-p): Use an
	alternate way to find if a buffer is a compilation buffer, for
	next-error convenience.
	(next-error-no-select, previous-error-no-select, next-error)
	(previous-error, first-error): Move to simple.el.
	(compilation-find-buffer): Move to next-error-find-buffer in simple.el.
	(compilation-last-buffer): Remove.
	(compilation-start, compilation-next-error, compilation-setup)
	(compilation-next-error-function, compilation-find-buffer):
	Remove compilation-last-buffer use.

The problem with this change is that for packages which use an inferior
(comint) interactive process to do the compilation (such as sml-mode,
haskell-mode, etc...), C-x ` doesn't work from the source buffer any more
(at least not until you used it from the comint buffer).

Now, the only place where compilation-last-buffer (aka
next-error-last-buffer) is set is in `compilation-start', which can't be
used for those cases.

So should we revert this part of the above change, or should sml-mode and
haskell-mode just manually set next-error-last-buffer, or should we introduce
a function that they can call?


        Stefan

                 reply	other threads:[~2006-03-20 21:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4q1spzi2.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.