From: Alan Mackenzie <acm@muc.de>
To: Sebastian Wiesner <swiesner@lunaryorn.com>
Cc: 19206@debbugs.gnu.org
Subject: bug#19206: 25.0.50; CC Mode tracks wrong source files
Date: Tue, 2 Dec 2014 12:02:26 +0000 [thread overview]
Message-ID: <20141202120226.GA4018@acm.acm> (raw)
In-Reply-To: <9C8C5538-BC19-4094-832C-3F3259DE37A5@lunaryorn.com>
Hello, Sebastian.
On Tue, Dec 02, 2014 at 12:03:21PM +0100, Sebastian Wiesner wrote:
> > Am 30.11.2014 um 19:42 schrieb Alan Mackenzie <acm@muc.de>:
> > Hello, again, Sebastian.
> > On Fri, Nov 28, 2014 at 10:25:42PM -0000, Alan Mackenzie wrote:
> >> Hello, Sebastian.
> >> In article <mailman.14863.1417170074.1147.bug-gnu-emacs@gnu.org> you wrote:
> >>> CC Mode tracks wrong source files when a CC Mode derived mode is
> >>> installed non-interactively.
[ .... ]
> > OK. The problem was that CC Mode was using the flag
> > `load-in-progress' to assume that a CC Mode file was being loaded,
> > for example by a `require' form inside a compilation of another CC
> > Mode file. This assumption breaks down when another file, such as
> > cc-miscompile.el, while loading, initiates compilation of a CC Mode
> > derivative.
[ .... ]
> > No, that wouldn't work. What I've implemented is when both loading
> > and byte-compilation are active at the same time, CC Mode walks down
> > the lisp stack to discover which one of them is actually active.
> Well, if you say… I find this “solution” horrifying, but I am probably
> just unable to appreciate the full complexity of this issue.
It is horrifying. I spent quite some time over the weekend searching for
a better solution, without success. The issue is quite simple: when
loading and compiling are nested in some unknown order, how do you
determine which of them is the "innermost" activity?
But, then again, maybe I could bind the "compilation flags" to nil around
each invocation of `load' inside the CC Mode compilation system. Yes,
I'll give that a try.
> > Please try the following patch, which seems to work in the test case you
> > supplied, in the real situation, and let me know how well it works. The
> > d-mode.elc produced can be successfully loaded into the Emacs that built
> > it.
> Do I need to build a patched Emacs to try it?
You need to rebuild CC Mode, but not necessarily the Emacs core. This
should do the job:
emacs -Q -batch -f batch-byte-compile path/to/lisp/progmodes/cc-*.el
, or you could just do a `make' from the main Emacs directory, possibly
deleting cc-*.elc first, just to make sure.
But feel free to wait until I've tried the alternative, better, approach
above. I'll get back to you later.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2014-12-02 12:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 10:19 bug#19206: 25.0.50; CC Mode tracks wrong source files Sebastian Wiesner
2014-11-28 19:49 ` Stefan Monnier
[not found] ` <mailman.14863.1417170074.1147.bug-gnu-emacs@gnu.org>
2014-11-28 22:25 ` Alan Mackenzie
2014-11-28 22:37 ` Sebastian Wiesner
2014-11-30 18:42 ` Alan Mackenzie
[not found] ` <20141130184221.GA12974@acm.acm>
2014-12-02 11:03 ` Sebastian Wiesner
2014-12-02 12:02 ` Alan Mackenzie [this message]
2014-12-02 14:02 ` Stefan Monnier
2014-12-07 22:46 ` Alan Mackenzie
2014-12-08 2:59 ` Stefan Monnier
2015-01-13 16:09 ` Alan Mackenzie
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=20141202120226.GA4018@acm.acm \
--to=acm@muc.de \
--cc=19206@debbugs.gnu.org \
--cc=swiesner@lunaryorn.com \
/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.