GNU bug report logs - #9148
Make `comment-normalize-vars' more syntax-aware

Previous Next

Package: emacs;

Reported by: Štěpán Němec <stepnem <at> gmail.com>

Date: Fri, 22 Jul 2011 14:57:02 UTC

Severity: wishlist

Tags: moreinfo

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 9148 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: 9148 <at> debbugs.gnu.org
Subject: Re: bug#9148: Make `comment-normalize-vars' more syntax-aware
Date: Tue, 02 Aug 2011 15:03:54 -0400
> The point is that you can define a major mode with different syntax
> tables in different parts of the text (using the syntax-table text
> property), but instead of using that information to determine
> comment-start and the other variables, `comment-normalize-vars' still
> relies on `comment-start' being hard-coded (which doesn't really make
> sense in a buffer with multiple comment syntaxes), even when
> `comment-use-syntax' is set and the syntax-table information is
> sufficient.

But this is part of a much larger problem (multiple major modes in the
same buffer).

Basically you're suggesting to use the syntax-table property as a way to
specify the major mode used in each part and then teach newcomment.el to
never use buffer-local variables but only the syntax-table around point.

It might be a good idea, but it's a non-trivial change (and still
leaves open the question of how to specify that I want //...\n for the
C chunks and (*...*) for the Pascal chunks).


        Stefan




This bug report was last modified 3 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.