From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware Date: Tue, 02 Aug 2011 15:03:54 -0400 Message-ID: References: <87ipqu5pwl.fsf@gmail.com> <87oc083xuw.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT X-Trace: dough.gmane.org 1312311882 8353 80.91.229.12 (2 Aug 2011 19:04:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2011 19:04:42 +0000 (UTC) Cc: 9148@debbugs.gnu.org To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 02 21:04:38 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKGb-0005aN-U8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2011 21:04:38 +0200 Original-Received: from localhost ([::1]:48970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoKGb-0001zJ-DU for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2011 15:04:37 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoKGY-0001z2-I8 for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 15:04:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoKGX-0005gn-FJ for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 15:04:34 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoKGX-0005gj-CU for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 15:04:33 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QoKH0-0000NR-CK; Tue, 02 Aug 2011 15:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2011 19:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9148 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9148-submit@debbugs.gnu.org id=B9148.13123118671391 (code B ref 9148); Tue, 02 Aug 2011 19:05:02 +0000 Original-Received: (at 9148) by debbugs.gnu.org; 2 Aug 2011 19:04:27 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKGQ-0000MN-Rr for submit@debbugs.gnu.org; Tue, 02 Aug 2011 15:04:26 -0400 Original-Received: from relais.videotron.ca ([24.201.245.36]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKGN-0000MF-Un for 9148@debbugs.gnu.org; Tue, 02 Aug 2011 15:04:24 -0400 Original-Received: from ceviche.home ([70.80.89.35]) by vl-mo-mrz23.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTP id <0LPB00746E8Z2FN0@vl-mo-mrz23.ip.videotron.ca> for 9148@debbugs.gnu.org; Tue, 02 Aug 2011 15:02:59 -0400 (EDT) Original-Received: by ceviche.home (Postfix, from userid 20848) id 217CC660CF; Tue, 02 Aug 2011 15:03:54 -0400 (EDT) In-reply-to: <87oc083xuw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 02 Aug 2011 15:05:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:49821 Archived-At: > 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