[Mesa-dev] [PATCH] Fix automatic indentation mode for recent emacs, use fewer columns in .git

Carl Worth cworth at cworth.org
Wed Apr 8 08:14:53 PDT 2015


On Wed, Apr 08 2015, Neil Roberts wrote:
> It seems a bit strange that this has stopped working for you.

Yes. I don't understand exactly what's going on.

> mode. The C and C++ modes both inherit from prog-mode, as well as a
> bunch of other ones such as Python and lisp files.

That's what I guessed, (given that we have "prog-mode" in our files). I
tried investigating a little bit, but didn't get too far.

From an editor session editing an emacs file, (whether my standard
environment or with "emacs -q"), "M-x describe-mode" says:

	C/l mode:
	Major mode for editing K&R and ANSI C code.

Which looks pretty standard to me. But I don't know what the identifier
for this mode would be to specify it in the .dir-locals.el file nor what
modes it inherits from.

> If you are using a
> non-standard mode for C files it would be surprising if it doesn't also
> inherit from prog-mode. I have just tested this with emacs -q (to
> prevent it from loading my personal config) on Emacs 24.3.1 and it does
> work as is.

No non-standard mode here, (at least not intentionally). And I also
verified the behavior is the same with "emacs -q". Maybe there's a
Debian-specific bug that I'm hitting here?

> I don't think the patch would break anything for me since you explicitly
> set the fill-column back to 70 for commit messages so I don't care
> enough to complain if you want to commit it anyway, but it does seem
> like something fishy is going on and the reasoning in the commit message
> doesn't add up.

I won't disagree there. I don't know the actual root cause, but since
this fixes an actual problem for me, and we haven't identified any
negative side effects, I'll plan to commit this change.

And if anyone can diagnose the root cause and improve .dir-locals.el
further, that will be fine too.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150408/eca4ccdd/attachment.sig>


More information about the mesa-dev mailing list