From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#35646: In SQL mode /- incorrectly starts a comment Date: Mon, 10 Aug 2020 13:25:23 +0200 Message-ID: <87h7ta7nfg.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29144"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 35646@debbugs.gnu.org To: Kristian Hole Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 10 13:26:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k55wR-0007Q4-1z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Aug 2020 13:26:11 +0200 Original-Received: from localhost ([::1]:60542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k55wP-0001lQ-NB for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Aug 2020 07:26:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k55wI-0001kn-Qd for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 07:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51355) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k55wI-0001cT-HJ for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 07:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k55wI-0004HY-CA for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 07:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Aug 2020 11:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35646 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35646-submit@debbugs.gnu.org id=B35646.159705873616415 (code B ref 35646); Mon, 10 Aug 2020 11:26:02 +0000 Original-Received: (at 35646) by debbugs.gnu.org; 10 Aug 2020 11:25:36 +0000 Original-Received: from localhost ([127.0.0.1]:34665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k55vr-0004Gh-Ve for submit@debbugs.gnu.org; Mon, 10 Aug 2020 07:25:36 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:46494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k55vq-0004GQ-2F for 35646@debbugs.gnu.org; Mon, 10 Aug 2020 07:25:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=VJbnMhkjtrA2pb6sGO81JH3w21iAT1Kdar9MiOwnly0=; b=BxkK5l2fnwEh8pW/V212ibrVke pB1kYHWKnRCDfH6MVaMTdA7TrJ/l6Si46V1cgbyUx5jF0YacUAyPfTynw4XNqZEQMi5zfmEvjOdGF yrK/ab8llNkLUOiB489NWPNiGfDaRrkaP+MoOonB0OVWrKsK1ghSXVH8lQbl2HeQB6UY=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k55vg-0003I1-Nm; Mon, 10 Aug 2020 13:25:27 +0200 In-Reply-To: (Kristian Hole's message of "Sun, 27 Oct 2019 21:48:26 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:184486 Archived-At: Kristian Hole writes: > Attached is a patch that fixes this by using the following > syntax-propertize-function: > > (set (make-local-variable 'syntax-propertize-function) > (syntax-propertize-rules > ("\\(/-\\)" (1 ".")) > ("\\(-\\*\\)" (1 ".")))) > > Adds sql-mode syntax propertize rules to fix comment highlighting > > Fixes the issue where -* and /- incorrectly starts comments > in SQL mode Bug(#35646). This is done by adding a > syntax-propertize-function to sql-mode. Thanks; I've now adapted your code to work in Emacs 28.1 -- some other changes had been made in this area that made your patch no longer apply. I also cleaned up (and simplified) the previous patch at the same time. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no