From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Newsgroups: gmane.emacs.bugs Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware Date: Tue, 02 Aug 2011 12:35:03 +0200 Message-ID: <87oc083xuw.fsf@gmail.com> References: <87ipqu5pwl.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1312281649 2776 80.91.229.12 (2 Aug 2011 10:40:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2011 10:40:49 +0000 (UTC) Cc: 9148@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 02 12:40:42 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 1QoCOw-0000tu-7s for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2011 12:40:42 +0200 Original-Received: from localhost ([::1]:38437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoCOv-00084Z-O2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2011 06:40:41 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoCOq-00083a-8F for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 06:40:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoCOp-0007NP-7w for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 06:40:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoCOp-0007NL-28 for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2011 06:40:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QoCPF-0001uh-Ky; Tue, 02 Aug 2011 06:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= 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 10:41:01 +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.13122816127297 (code B ref 9148); Tue, 02 Aug 2011 10:41:01 +0000 Original-Received: (at 9148) by debbugs.gnu.org; 2 Aug 2011 10:40:12 +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 1QoCOR-0001td-9o for submit@debbugs.gnu.org; Tue, 02 Aug 2011 06:40:11 -0400 Original-Received: from mail-ew0-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoCOO-0001tU-Jo for 9148@debbugs.gnu.org; Tue, 02 Aug 2011 06:40:09 -0400 Original-Received: by ewy19 with SMTP id 19so3646597ewy.3 for <9148@debbugs.gnu.org>; Tue, 02 Aug 2011 03:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:content-transfer-encoding; bh=EhXgNvfCP7TJ+5EI7bWo6OIDAQsC/TDsIyj2W/nXjtU=; b=Sj02cKSjSHf2i3fBTkou+DXcWLZr7cVkC4BLoYqF261lJhy4jhvatdRvuwpdzt4qMi SLbrbpQ0Av9hagIL9Ivo27q4Obr08DrxA0oCDkiQ+0xlcyO3gmH6ZdILM09UM3NmixFD Ak6kFd/0WNvqLN/yY36wydZmwUUeMOFS+4w+U= Original-Received: by 10.204.101.10 with SMTP id a10mr1792364bko.183.1312281580254; Tue, 02 Aug 2011 03:39:40 -0700 (PDT) Original-Received: from localhost (176.119.broadband10.iol.cz [90.177.119.176]) by mx.google.com with ESMTPS id x1sm1865692fah.0.2011.08.02.03.39.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Aug 2011 03:39:39 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 02 Aug 2011 00:04:03 -0400") 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 06:41:01 -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:49797 Archived-At: On Tue, 02 Aug 2011 06:04:03 +0200 Stefan Monnier wrote: >> Unfortunately, even though there is a `comment-use-syntax' variable >> which is apparently supposed to indicate that the comment functions >> should rely on syntax information instead of `comment-prefix' and >> friends, one piece is missing -- the function `comment-normalize-vars', >> called at invocation of functions like {comment,uncomment}-region, still >> requires `comment-start' to be set explicitly even though the syntax >> information is sufficient and `comment-use-syntax' set. > > I'm not sure I understand the problem. Can you give a more concrete > example where you get undesirable behavior? > Setting comment-start is usually needed to tell Emacs *which* of the > major mode's comment syntaxes to use (so it's only theoretically > unneeded if the syntax-table only include a single comment syntax). 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. --=20 =C5=A0t=C4=9Bp=C3=A1n