From unknown Wed Sep 10 16:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware 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: Fri, 22 Jul 2011 14:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9148 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 9148@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs Received: via spool by submit@debbugs.gnu.org id=B.131134661510797 (code B ref -1); Fri, 22 Jul 2011 14:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jul 2011 14:56:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QkH9r-0002o6-2A for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:56:55 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QkH9o-0002nu-VZ for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:56:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkH9i-0003nx-OB for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:56:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:35585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkH9i-0003nt-Mg for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:56:46 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkH9h-0002HT-IC for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:56:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkH9f-0003nK-OW for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:56:45 -0400 Received: from mail-fx0-f52.google.com ([209.85.161.52]:52723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkH9f-0003n3-J0 for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:56:43 -0400 Received: by fxd18 with SMTP id 18so4367424fxd.39 for ; Fri, 22 Jul 2011 07:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=d0JPKLUd30kD96EXXLwRvT5lrGjWxP/wd4f0lT9KV90=; b=GwMYXj5sncEU5g9ez5TisJhgMHaECQkLGEqZVC/OLlrm0tTVCRSdpfSUuqEv/5BD0/ XawWv8PfobHYoQWTBiD2Kf4A9vn5EBmHE2GGJ96xaJ8YIq4DNsIv2mLfQr5i8p3dif+l wiFWNlDhP1Hw3RKuxgI/8lipPHZfBIjs4tXHc= Received: by 10.223.29.10 with SMTP id o10mr2237940fac.87.1311346602260; Fri, 22 Jul 2011 07:56:42 -0700 (PDT) Received: from localhost (176.119.broadband10.iol.cz [90.177.119.176]) by mx.google.com with ESMTPS id a18sm2090962faa.30.2011.07.22.07.56.39 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jul 2011 07:56:40 -0700 (PDT) From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Date: Fri, 22 Jul 2011 16:52:10 +0200 Message-ID: <87ipqu5pwl.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.8 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.8 (----) Problem: -------- Emacs currently provides relatively decent support for major modes with multiple syntaxes, mainly via the `syntax-table' text property. 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. Suggested solution: ------------------- Modify `comment-normalize-vars' so that it uses the syntax information (current syntax table, `syntax-table' text property) _only_, whenever `comment-use-syntax' is set and this is possible. Use case: --------- Consider a major mode with two or more clearly separate syntaxes (Org mode source blocks could be one example), including comments. Even though it is possible to provide the different text extents with different values of the `syntax-table' text property, the only way to work around `comment-normalize-vars' not relying on them currently seems something like the following: (defadvice comment-normalize-vars (around use-syntax-info activate) (set (make-local-variable 'comment-start) (determine-comment-start-based-on-syntax-info)) ad-do-it) ...which is evil, ugly and doesn't scale. --=20 =C5=A0t=C4=9Bp=C3=A1n From unknown Wed Sep 10 16:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware 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 04:05: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: To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Cc: 9148@debbugs.gnu.org Received: via spool by 9148-submit@debbugs.gnu.org id=B9148.13122578731834 (code B ref 9148); Tue, 02 Aug 2011 04:05:01 +0000 Received: (at 9148) by debbugs.gnu.org; 2 Aug 2011 04:04:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qo6DY-0000TW-P9 for submit@debbugs.gnu.org; Tue, 02 Aug 2011 00:04:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qo6DW-0000TO-G0 for 9148@debbugs.gnu.org; Tue, 02 Aug 2011 00:04:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EADF2N05FxKfe/2dsb2JhbABCp194gUABAQQBViMFCws0EhQYDSSHf8EPhkIEn0qEMQ X-IronPort-AV: E=Sophos;i="4.67,304,1309752000"; d="scan'208";a="128373872" Received: from 69-196-167-222.dsl.teksavvy.com (HELO ceviche.home) ([69.196.167.222]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 02 Aug 2011 00:04:04 -0400 Received: by ceviche.home (Postfix, from userid 20848) id C52B7660CF; Tue, 2 Aug 2011 00:04:03 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87ipqu5pwl.fsf@gmail.com> Date: Tue, 02 Aug 2011 00:04:03 -0400 In-Reply-To: <87ipqu5pwl.fsf@gmail.com> ("=?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?="'s message of "Fri, 22 Jul 2011 16:52:10 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > 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). Stefan From unknown Wed Sep 10 16:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware 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: To: Stefan Monnier Cc: 9148@debbugs.gnu.org Received: via spool by 9148-submit@debbugs.gnu.org id=B9148.13122816127297 (code B ref 9148); Tue, 02 Aug 2011 10:41:01 +0000 Received: (at 9148) by debbugs.gnu.org; 2 Aug 2011 10:40:12 +0000 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 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 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= Received: by 10.204.101.10 with SMTP id a10mr1792364bko.183.1312281580254; Tue, 02 Aug 2011 03:39:40 -0700 (PDT) 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) From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= In-Reply-To: (Stefan Monnier's message of "Tue, 02 Aug 2011 00:04:03 -0400") References: <87ipqu5pwl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Date: Tue, 02 Aug 2011 12:35:03 +0200 Message-ID: <87oc083xuw.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.7 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.7 (---) 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 From unknown Wed Sep 10 16:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware 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: To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Cc: 9148@debbugs.gnu.org Received: via spool by 9148-submit@debbugs.gnu.org id=B9148.13123118671391 (code B ref 9148); Tue, 02 Aug 2011 19:05:02 +0000 Received: (at 9148) by debbugs.gnu.org; 2 Aug 2011 19:04:27 +0000 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 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 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII 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) Received: by ceviche.home (Postfix, from userid 20848) id 217CC660CF; Tue, 02 Aug 2011 15:03:54 -0400 (EDT) From: Stefan Monnier Message-id: References: <87ipqu5pwl.fsf@gmail.com> <87oc083xuw.fsf@gmail.com> Date: Tue, 02 Aug 2011 15:03:54 -0400 In-reply-to: <87oc083xuw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > 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 From unknown Wed Sep 10 16:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware 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 19:55: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: To: Stefan Monnier Cc: 9148@debbugs.gnu.org Received: via spool by 9148-submit@debbugs.gnu.org id=B9148.13123148749223 (code B ref 9148); Tue, 02 Aug 2011 19:55:01 +0000 Received: (at 9148) by debbugs.gnu.org; 2 Aug 2011 19:54:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoL2w-0002Oi-EB for submit@debbugs.gnu.org; Tue, 02 Aug 2011 15:54:34 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoL2u-0002OZ-DY for 9148@debbugs.gnu.org; Tue, 02 Aug 2011 15:54:33 -0400 Received: by fxe6 with SMTP id 6so169619fxe.3 for <9148@debbugs.gnu.org>; Tue, 02 Aug 2011 12:54:02 -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=SJLdzFIgwKaUVckWf7F501uRkbwBvlnEIqmcyQUJR+g=; b=XNFrUaoKEKRcWa3oMO4+4BEvpkGo5ySMg8JLzmQ5Ju1t47z73LLSt5OugrrvqIdIy2 BkI3SsD0uhMh6bg0AVeVMTzEJjvcZqkTtWgP6Bb7VlFNgNJlCxhYROdlkKCP56ynbg/9 5a2iXoXLFC7w2q7EUCTZE7qeNhyVDndVln8ok= Received: by 10.223.145.22 with SMTP id b22mr9033809fav.95.1312314842057; Tue, 02 Aug 2011 12:54:02 -0700 (PDT) Received: from localhost (176.119.broadband10.iol.cz [90.177.119.176]) by mx.google.com with ESMTPS id o18sm54262fal.47.2011.08.02.12.53.59 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Aug 2011 12:54:01 -0700 (PDT) From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= In-Reply-To: (Stefan Monnier's message of "Tue, 02 Aug 2011 15:03:54 -0400") References: <87ipqu5pwl.fsf@gmail.com> <87oc083xuw.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Date: Tue, 02 Aug 2011 21:49:24 +0200 Message-ID: <87bow74mrf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.7 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.7 (---) On Tue, 02 Aug 2011 21:03:54 +0200 Stefan Monnier wrote: >> 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). Maybe, but the specific change to `comment-normalize-vars' (gather the appropriate value for `comment-start' from the syntax-table at point instead of prompting the user when `comment-use-syntax' is set) I proposed would seem easy enough and fix this very problem. > 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. More precisely and less ambitiously, I'm suggesting to do what `comment-use-syntax' seems to be claiming already (that's also why I still consider this a bug, not an enhancement request) -- to rely on syntax-table instead of the regexp variables when manipulating comments. > 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). I don't understand. Again: the case I've described, the comment syntax is unambiguously specified for every part of the buffer using the syntax-table (either the buffer-local value, or the text property value). The C chunks have the C syntax table as its value, the Pascal chunks have the Pascal syntax table as its value (if there is such a thing -- I don't use C or Pascal; in my specific case it was JavaScript on one hand and a VimL[1]-like custom syntax with double quote comment start and end-of-line comment end on the other). The only thing that's needed to fix this very use case is make `comment-normalize-vars' set `comment-start' from the syntax-table when `comment-use-syntax' is set, instead of forcing me to advise it and do it myself. It'd still be ugly, but not more ugly than it already is now, and certainly better than using advice. [1] The "language" used for Vim scripting. --=20 =C5=A0t=C4=9Bp=C3=A1n From unknown Wed Sep 10 16:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware 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 20:47: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: To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Cc: 9148@debbugs.gnu.org Received: via spool by 9148-submit@debbugs.gnu.org id=B9148.131231800217541 (code B ref 9148); Tue, 02 Aug 2011 20:47:02 +0000 Received: (at 9148) by debbugs.gnu.org; 2 Aug 2011 20:46:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoLrN-0004Yp-Ha for submit@debbugs.gnu.org; Tue, 02 Aug 2011 16:46:41 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoLrL-0004Yh-Db for 9148@debbugs.gnu.org; Tue, 02 Aug 2011 16:46:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAOVhOE5FxKfe/2dsb2JhbABCp2d4gUABAQQBViMFCws0EhQYDSSHf8AOhkIEn0qEMQ X-IronPort-AV: E=Sophos;i="4.67,307,1309752000"; d="scan'208";a="128464327" Received: from 69-196-167-222.dsl.teksavvy.com (HELO ceviche.home) ([69.196.167.222]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 02 Aug 2011 16:45:49 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 56A1E660CF; Tue, 2 Aug 2011 16:45:49 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87ipqu5pwl.fsf@gmail.com> <87oc083xuw.fsf@gmail.com> <87bow74mrf.fsf@gmail.com> Date: Tue, 02 Aug 2011 16:45:48 -0400 In-Reply-To: <87bow74mrf.fsf@gmail.com> ("=?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?="'s message of "Tue, 02 Aug 2011 21:49:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >>> 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). > Maybe, but the specific change to `comment-normalize-vars' (gather the > appropriate value for `comment-start' from the syntax-table at point > instead of prompting the user when `comment-use-syntax' is set) I > proposed would seem easy enough and fix this very problem. We could do that, yes, but unless we regularly flush the comment-start value we got, it will then keep using the first value found even on chunks using another language. >> 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. > More precisely and less ambitiously, I'm suggesting to do what > `comment-use-syntax' seems to be claiming already (that's also why I > still consider this a bug, not an enhancement request) -- to rely on > syntax-table instead of the regexp variables when manipulating comments. comment-use-syntax was less ambitious: it was mostly about using forward-comment. It does try to build some of the vars from the syntax-table, but mostly because comment-end-skip was new in newcomment.el and I needed the code to work with old packages ;-) But yes, comment-start could sometimes also be set from the syntax-table. I might accept a patch for it, tho I'm not completely sure how useful that would be. >> 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). > I don't understand. Again: the case I've described, the comment syntax > is unambiguously specified for every part of the buffer using the > syntax-table (either the buffer-local value, or the text property > value). The C chunks have the C syntax table as its value, the Pascal That's not unambiguous: the C syntax-table specifies several comment syntaxes (/*..*/ and //..\n) and so does the Pascal syntax table (even more combinations, IIRC). So comment-start-skip can be built from the syntax-table since it needs to match "any comment starter", but comment-start is more problematic since it would need to choose whose comment syntax to favor. > The only thing that's needed to fix this very use case is make > `comment-normalize-vars' set `comment-start' from the syntax-table when > `comment-use-syntax' is set, instead of forcing me to advise it and do > it myself. It'd still be ugly, but not more ugly than it already is now, > and certainly better than using advice. But if it's not a major mode used over the whole file, when do you flush the comment-start value you computed? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 09 18:24:54 2017 Received: (at control) by debbugs.gnu.org; 9 Jul 2017 22:24:54 +0000 Received: from localhost ([127.0.0.1]:59265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUKdK-0004oA-3g for submit@debbugs.gnu.org; Sun, 09 Jul 2017 18:24:54 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:37941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUKdI-0004nx-7N for control@debbugs.gnu.org; Sun, 09 Jul 2017 18:24:53 -0400 Received: by mail-it0-f44.google.com with SMTP id k192so21978401ith.1 for ; Sun, 09 Jul 2017 15:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=Tj/BG8GUPDwTJW/vRTy9V3Sh4IShGFEqWZbZHB7Kqdg=; b=N+fZJwaxO6AbHTpY2hCvaM+s8kGPX+iO2Nb/9/TnE0v2jEOytBE+K69c7zdkL5bX2l 6lGueRCu6bS1IOwny9zf/mQhb97aJmaFWqgKoqVaxynHsCvQJ7KffIIE/5vhoabN5Fum wvtlvRQZkz6NAUuV86zruuHZHZuyptHw8E5PGpSLUPZwnRLzPfVMwn+5qq/x9ZRXLJT4 ZpaBwCeExQHPTmV9TcQ440eBOqqBUkGn2z8syCaytif+zy9i2rrQPBwt/+BPg8/SXJm+ 8l/6NloRsu+8kVmZIiNWkieg59804hCC9D9SeT2qveMDcFcPZAa0/3n0FyfRyyZzQgwt w5Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=Tj/BG8GUPDwTJW/vRTy9V3Sh4IShGFEqWZbZHB7Kqdg=; b=cvnMdREGYE9YKgNbw1XrMNPJSIxG5a+Om5AosmqIka69U+8xrzgyGwDPV3BbhCur4y dVRJnsM+fW/3Q+wnoZMSP4dIxRskirKevAByC2i8m/nhF/3cErcbI9lJCgEXAdvQ74sd 8l+kny8nphFnvmZDg2RA1ls6wMKqwEEa7ZHnIZk9Xx1UtZZmFZ+i+xlBZb/XABZdGbtl ZhH2R+LBHlQrWaZ5uyBlj4leaX5Kg+6KyFsPxkiMcFzSC80iqPc++xz/XcUdBMe/Qis5 w1TBhRPx6om6AvuW9GB72QQncrOKSzKySFwpfb3X7FDISqmYWQVL42oSYKADUtBpULUr 4M3Q== X-Gm-Message-State: AIVw113k39eCdruskq/rUDy9y7AOtCOV1jlUypM0mUIIzJpla7R/l39V xEzq3JyMrpkRV3JX X-Received: by 10.36.0.142 with SMTP id 136mr8288934ita.99.1499639086441; Sun, 09 Jul 2017 15:24:46 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id f189sm714697ioe.10.2017.07.09.15.24.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jul 2017 15:24:45 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: control message for bug #9148 Date: Sun, 09 Jul 2017 18:26:18 -0400 Message-ID: <87shi5fdrp.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) severity 9148 wishlist quit From unknown Wed Sep 10 16:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jan 2022 17:58: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: To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Cc: 9148@debbugs.gnu.org Received: via spool by 9148-submit@debbugs.gnu.org id=B9148.164330624018419 (code B ref 9148); Thu, 27 Jan 2022 17:58:02 +0000 Received: (at 9148) by debbugs.gnu.org; 27 Jan 2022 17:57:20 +0000 Received: from localhost ([127.0.0.1]:56494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD91M-0004n1-7X for submit@debbugs.gnu.org; Thu, 27 Jan 2022 12:57:20 -0500 Received: from quimby.gnus.org ([95.216.78.240]:33384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD91K-0004md-GJ for 9148@debbugs.gnu.org; Thu, 27 Jan 2022 12:57:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=vU7rCnZlG+Xk/Y7G04/nFmLdABPNilNd+o8G8WlFUHw=; b=Tx7IK8/DCAKoSPbG7Jh1jBzmYc 2AMKc+01Qcu3DXlhvOLO1v3zBCTrpes5VQUQMTiXcrMRKeg4IWhKjxiJb57J1luhZO74cpS0QlqA4 Yx8qddsWJkYpH4z+BEObIot14xe/uhZMC0QX4RXxklCVpMXAko/J3OIrI5qYXLZ6XDSA=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nD91B-0000md-Sq; Thu, 27 Jan 2022 18:57:12 +0100 From: Lars Ingebrigtsen References: <87ipqu5pwl.fsf@gmail.com> X-Now-Playing: David Sylvian's _Everything And Nothing (Bonus)_: "The Scent of Magnolia (edit)" Date: Thu, 27 Jan 2022 18:57:09 +0100 In-Reply-To: <87ipqu5pwl.fsf@gmail.com> ("=?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?="'s message of "Fri, 22 Jul 2011 16:52:10 +0200") Message-ID: <874k5pkqoa.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= writes: > Suggested solution: > > > Modify `comment-normalize-vars' so that it uses the syntax information > (current syntax table, `syntax-table' text property) _only_, whenever > `commen [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec writes: > Suggested solution: > ------------------- > > Modify `comment-normalize-vars' so that it uses the syntax information > (current syntax table, `syntax-table' text property) _only_, whenever > `comment-use-syntax' is set and this is possible. (I'm going through old bug reports that unfortunately weren't resolved at the time.) We now have some multi-mode modes in Emacs, so I'm not sure what's being proposed here is necessary these days (or indeed it has been fixed in the decade since this was reported). Is this something that is still relevant? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 27 12:57:26 2022 Received: (at control) by debbugs.gnu.org; 27 Jan 2022 17:57:26 +0000 Received: from localhost ([127.0.0.1]:56498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD91S-0004nM-ER for submit@debbugs.gnu.org; Thu, 27 Jan 2022 12:57:26 -0500 Received: from quimby.gnus.org ([95.216.78.240]:33398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD91Q-0004mz-Uy for control@debbugs.gnu.org; Thu, 27 Jan 2022 12:57:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nBTc+l1qKRNDkZZfrpR4vvy789/Q8EB7UAlpLsxOZ8U=; b=Ps1doFpgP1jGL1BukMBMACbCB7 x4zon7cgfqZS6vivjgvIJy7iIRUJTMQjonrY7JepFroHDFLC0dYkhBywJRIM81pBbtBbkg/EbsZhn mgY8GuHbxe7nMuqew6fqg4pxY2qFQCIY4Pmw5IK2MCYZmvD1u5l6MkduV1ShS44KP9Lc=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nD91I-0000ml-QW for control@debbugs.gnu.org; Thu, 27 Jan 2022 18:57:18 +0100 Date: Thu, 27 Jan 2022 18:57:14 +0100 Message-Id: <8735l9kqo5.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #9148 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 9148 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 9148 + moreinfo quit From unknown Wed Sep 10 16:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware Resent-From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Jan 2022 21:40: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: moreinfo To: Lars Ingebrigtsen Cc: 9148@debbugs.gnu.org Received: via spool by 9148-submit@debbugs.gnu.org id=B9148.164366519318014 (code B ref 9148); Mon, 31 Jan 2022 21:40:02 +0000 Received: (at 9148) by debbugs.gnu.org; 31 Jan 2022 21:39:53 +0000 Received: from localhost ([127.0.0.1]:41092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEeOu-0004gU-Nm for submit@debbugs.gnu.org; Mon, 31 Jan 2022 16:39:52 -0500 Received: from mail-ed1-f49.google.com ([209.85.208.49]:43690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEeOs-0004gE-B0 for 9148@debbugs.gnu.org; Mon, 31 Jan 2022 16:39:51 -0500 Received: by mail-ed1-f49.google.com with SMTP id w14so29685944edd.10 for <9148@debbugs.gnu.org>; Mon, 31 Jan 2022 13:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=7eDgTtRn59y4JsDXKJ+ng3E2ExmImXGl9zmGhlj1xIs=; b=BvdlT9uM5zackrLXQvtUarL07VMmnN5H7mANrHfjPSxk0V2VSQWAwQFIsiSRRQwkMk dXQy8WN8pkfQHSXFPG4VvirtOhcNBChHLgm+R0qVIyFqd/BgIDjxY+bBqm2mX0hUD09Z yGtMpeR1vuS9DEcvSnqg1Pdy0NF+9g+vOZVKIt9NtrreTdHiujMaL36ytX3zPgqZM3wA py2X4fxYHi9JrxfeKP+3jnLXGmPis6vR6j/6x9FqWnmv1siMoAJo2t5Wl1q1prUJUPxb 1sxkX4uJvmor4Yf1pTImQ75EosphSQ4XXozLjQJIbgevC6mR/G2zWidsRUPsktVSd8n0 ztTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=7eDgTtRn59y4JsDXKJ+ng3E2ExmImXGl9zmGhlj1xIs=; b=y9+S/eATJzoSB1EXrqMTjMdtV8L13NcWTHCCMt5S5h2rwPuk8PI8n9V8EvkqlQykxp SCzXVvU2HAm91GMgUMffAwqGlaZJU2ehRqDW73Om41nxXq6BMphEd3P1Wb47xxqszG3k i2IkL7KDuMGzpDiZ0zes57uxhncn3J1SqstIy599/3Z8nFhlMwGwD58RfxbxXVo3VTyr 6C37kIBWsTLx7MaOylcwJormuHrQQAvpWHuuufBFvs3Lq2fYghuBobG9dxXJvdDIBdps A5G3B4LXsqOPIDWVn5rrifsrliVDqesXywWd1pDqWcg+A5ZluWJJhCT7VhkHmK2ALDEz 8gpg== X-Gm-Message-State: AOAM533ECXa3PaHt4e+cxYES6I8IuBp5XzCFMwnsmFXHJNCxtE92guxc sBtRsNm34kKnjZtsmvDZsOM= X-Google-Smtp-Source: ABdhPJwVLzZ/hfpo1F6Jvc7IvHUYbLRg/1+QxOHfYySnT+J+70vd1byjBAkSdilIIxxa6Y+JydjoqQ== X-Received: by 2002:a05:6402:254a:: with SMTP id l10mr22202067edb.230.1643665184192; Mon, 31 Jan 2022 13:39:44 -0800 (PST) Received: from localhost ([185.112.167.34]) by smtp.gmail.com with ESMTPSA id d25sm13912968ejz.4.2022.01.31.13.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 13:39:43 -0800 (PST) From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= In-Reply-To: <874k5pkqoa.fsf@gnus.org> References: <87ipqu5pwl.fsf@gmail.com> <874k5pkqoa.fsf@gnus.org> User-Agent: Notmuch/0.34.3 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Mon, 31 Jan 2022 22:39:50 +0100 Message-ID: <20220131223950+0100.312285-stepnem@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, 27 Jan 2022 18:57:09 +0100 Lars Ingebrigtsen wrote: > =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec writes: > >> Suggested solution: >> ------------------- >> >> Modify `comment-normalize-vars' so that it uses the syntax information >> (current syntax table, `syntax-table' text property) _only_, whenever >> `comment-use-syntax' is set and this is possible. > > (I'm going through old bug reports that unfortunately weren't resolved > at the time.) > > We now have some multi-mode modes in Emacs, so I'm not sure what's being > proposed here is necessary these days (or indeed it has been fixed in > the decade since this was reported). Is this something that is still > relevant? Honestly, I don't know: I ended up using the defadvice hack those 10 years ago, but a few years after that the major mode that needed it became obsolete along with the application whose config files it supported, and I haven't needed anything similar since then. Given that nobody other than Stefan, who expressed reservations to my suggestions, has chimed in during those 10 years and, as you say, the landscape of possible solutions has likely changed, in its current state this bug report will probably not be less useful closed than it is opened, should you so prefer. Thanks, =C5=A0t=C4=9Bp=C3=A1n From unknown Wed Sep 10 16:23:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9148: Make `comment-normalize-vars' more syntax-aware Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Feb 2022 17:22: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: moreinfo To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Cc: 9148@debbugs.gnu.org Received: via spool by 9148-submit@debbugs.gnu.org id=B9148.16438225021943 (code B ref 9148); Wed, 02 Feb 2022 17:22:02 +0000 Received: (at 9148) by debbugs.gnu.org; 2 Feb 2022 17:21:42 +0000 Received: from localhost ([127.0.0.1]:53315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFJK9-0000VH-Uc for submit@debbugs.gnu.org; Wed, 02 Feb 2022 12:21:42 -0500 Received: from quimby.gnus.org ([95.216.78.240]:41774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFJK5-0000Uv-T6 for 9148@debbugs.gnu.org; Wed, 02 Feb 2022 12:21:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2CtW2aFgDAdqIvnQ736qFOCijsKsmM2XVErnVrFeVGE=; b=o3g/EvX9bghcDDvU/N2+M3kPAP c4zZM/kApSqNL4QmujzlFdv2k4LwO3e+l0hK7gnSE54oXPWtEtJoAPTZoEYe0RvA2CY5Q02kebWED AnWPTpt/C8Q6KRuEKPZveDgQdowhtwzc17FA6yfBnSQOhyse3CzxRmLIfnO8dh6msd2U=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFJJw-00067n-Gx; Wed, 02 Feb 2022 18:21:31 +0100 From: Lars Ingebrigtsen References: <87ipqu5pwl.fsf@gmail.com> <874k5pkqoa.fsf@gnus.org> <20220131223950+0100.312285-stepnem@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEWYi3bcy67p1bPf zK5fVk1KQjyEeWpDPDb///9hueWkAAAAAWJLR0QIht6VegAAAAd0SU1FB+YCAhEOM+C3TAsAAAGq SURBVDjLrZRbTsMwEEUDiviOmQ1QewXj2QCPOPyCGpMNVKygabfPnbEdgVq+wFKiyMd33k5346+v 7hew+yMIzhZJAU6YhEUoDv1Y1pMBwZ4TIO8APvCkDcCKmhoM3DVFUOAbmPvpGxAnjpz6mOd+bgD2 hYP66BS442F6qYoY4SJEgDnlm9yPFcStPgoel+kKGFNejmv/Xk1tYEwp59OY3n8qQprGDMUF8IdP BWu+BCgTbOWlgtBAQuIAH4f9z7IHhJTzOT8NlyArehta5kIiUXbhFSDP+VQUkbBpqwCgVAFJBYvt r8u63ynQ6mprOZTzeF4eFLBoRyAz5+benEMRqqmk9tGnZEAHwQgDzMgxTa/PBlg252M+r+NyXPZF oVPFpK3FutPXbQPwDZ0X8uy4jShZHo7JiszItgFXBrRMl4RtqMkSxGTpPG5driCqgL2NuqoN4JuC lpE9ObjiGLkBNaU+2Vkg2utd1wHo+WghCXM5U0ApL+sVUrYBuzV6S8o+UwOtVr59xG+mgloupbQb VkwRgie53xSQGEDkejL4WAQBZxTQ9R/A/4EvkUS/H2sl77AAAAAldEVYdGRhdGU6Y3JlYXRlADIw MjItMDItMDJUMTc6MTQ6NTErMDA6MDAXVhGkAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTAyLTAy VDE3OjE0OjUxKzAwOjAwZgupGAAAAABJRU5ErkJggg== X-Now-Playing: Prince Albert Hunt's Texas Ramblers's _Anthology of American Folk Music: Social Music (1)_: "Wake Up Jacob" Date: Wed, 02 Feb 2022 18:21:27 +0100 In-Reply-To: <20220131223950+0100.312285-stepnem@gmail.com> ("=?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?="'s message of "Mon, 31 Jan 2022 22:39:50 +0100") Message-ID: <87zgn9tca0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= writes: > Given that nobody other than Stefan, who expressed reservations to my > suggestions, has chimed in during those 10 years and, as you say, the > landscape of possible solutions has likely changed, in [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec writes: > Given that nobody other than Stefan, who expressed reservations to my > suggestions, has chimed in during those 10 years and, as you say, the > landscape of possible solutions has likely changed, in its current state > this bug report will probably not be less useful closed than it is > opened, should you so prefer. OK; closing this bug report, then. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 02 12:21:50 2022 Received: (at control) by debbugs.gnu.org; 2 Feb 2022 17:21:50 +0000 Received: from localhost ([127.0.0.1]:53318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFJKI-0000Ve-4j for submit@debbugs.gnu.org; Wed, 02 Feb 2022 12:21:50 -0500 Received: from quimby.gnus.org ([95.216.78.240]:41788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFJKH-0000VQ-8o for control@debbugs.gnu.org; Wed, 02 Feb 2022 12:21:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=StcD77z8dUBPmZQKbNno+eVU1JApP0ddbHUmxxsWzuw=; b=sYhNpJfPkdg2Dq7fHHTSCivqy5 WwiB2g6Gg7tBKvBqc/8KPVVv4GxLq/dj3ivaHp0wP890q5gaQKF55qZk9lpPn/i0PKQIt0cdoWmGR gu+WUwhCgpD5r6gOt8qsqQ9LXaIfHfUfkruyRVmTbL3n7+uTdY9YFU7KJ6niIQ7+G6AE=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFJK9-00067v-7L for control@debbugs.gnu.org; Wed, 02 Feb 2022 18:21:43 +0100 Date: Wed, 02 Feb 2022 18:21:38 +0100 Message-Id: <87y22ttc9p.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #9148 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 9148 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 9148 quit