From unknown Fri Aug 22 01:03:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35646: In SQL mode /- incorrectly starts a comment Resent-From: Michel de Ruiter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2019 07:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35646 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 35646@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Reply-To: mdruiter@gmail.com Received: via spool by submit@debbugs.gnu.org id=B.15573886572941 (code B ref -1); Thu, 09 May 2019 07:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 May 2019 07:57:37 +0000 Received: from localhost ([127.0.0.1]:34604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOdvs-0000lN-R9 for submit@debbugs.gnu.org; Thu, 09 May 2019 03:57:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOdvr-0000l8-FC for submit@debbugs.gnu.org; Thu, 09 May 2019 03:57:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:44984) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hOdvm-0002b1-6H for submit@debbugs.gnu.org; Thu, 09 May 2019 03:57:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOdvl-0008TY-5G for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 03:57:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOdvk-0002Zy-6h for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 03:57:29 -0400 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]:34842) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOdvk-0002ZV-2j for bug-gnu-emacs@gnu.org; Thu, 09 May 2019 03:57:28 -0400 Received: by mail-io1-xd2a.google.com with SMTP id p2so920485iol.2 for ; Thu, 09 May 2019 00:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=ZiNbHFB9O20xuhzGGevzktNnqLRVXNiXyfpH9xAlEcY=; b=JO6bkOOe8c8xDYXTo/d5WJE9GSmySNyl4+0o9Mv2l9zx+ehX+UHsgCOSqXv12VEemc NYcCfaaq1juu8RreUQ+BmArbzlkm5BdLjRdlGjPK2NVjSv/oLVgedGpGK7BxEOmPmwxD m0txbeYj1qWT9K/mEgVQpGV0Mqt0YVM4fZLNKC7c45FutEBQ8h1LqyTyE06E65aj2Tzn QWc1Z3H5XaE46lxxjiQXN9GhexaUgJZ2IomRRShtdXX11useyUloGf1o8jZqdhtxl2cP 0RgCPkUDiCI5eP2VfSs4W40qHzsEvRFiE5f6C02d6ULaVHA9iwZAbluqQ8LWe4MlhIFj yKCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=ZiNbHFB9O20xuhzGGevzktNnqLRVXNiXyfpH9xAlEcY=; b=q2C9Kep0rpe6EeHWC1FNGpeI9l/8zp70m/hXIZTjDRINsT2T9+ax7dbN42VKMdBcXD DZH/kTDvCBw7io7zDe2uzc7M0HuVq3RLX9sVet2rILRekhKHkOLBBEmbptk5ccnir2xY 9D9lcoD9aMCBzu7wAv/+E6zFw0ahMx4yrRSDtlxdxy/nZtM2Qykrpf1WfZSJG03toQDA DP9iBtoFq0dgbE+hc9gNukQs6A3eVKeD9ScFzwmeQ37U3J0frqC4jJCie4Uo+y+s67NX kOxPiZNGOkNsVypRc8Ctpa0kFDI9YkwuKSRjTf8tSapd91/uSJE8EgFzYsSYQZUkarho UZ6g== X-Gm-Message-State: APjAAAUJ3JyJ8Gea/cPTAU2SSDV9aW0ePll9hHes9yF2I5W1RfwLLj1j nTPvHK7SJU5Q/e6M//eVwDZaBcy/OMbkxiGcQtYZUpLR X-Google-Smtp-Source: APXvYqw97QQjNynBOvgsXt5jajl019NfDoAZ8plrvUxgJfVVSgnTZZq40uRhCegyQIsu7P9F+ZOhiHl1g6sxVGbrUHQ= X-Received: by 2002:a5e:c817:: with SMTP id y23mr1724533iol.290.1557388646127; Thu, 09 May 2019 00:57:26 -0700 (PDT) MIME-Version: 1.0 From: Michel de Ruiter Date: Thu, 9 May 2019 09:56:46 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d2a X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.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: -2.3 (--) Hi, I found that both -* and /- incorrectly start a comment in SQL mode. The -* combination starts a block comment, but cannot be valid SQL syntax AFAIK. However /- can be and should not start a line comment as it does now. The simplest example is: SELECT 1/-1 It took me a while (https://emacs.stackexchange.com/q/50375) to understand that this is expected behavior given the sql-mode-syntax-table. Of course using whitespace to separate / and - 'solves' the issue. Someone might want to properly fix this using syntax-propertize-function (as suggested by Stefan Monnier?, https://emacs.stackexchange.com/a/50399). Hope this helps! Greets, Michel. From unknown Fri Aug 22 01:03:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35646: In SQL mode /- incorrectly starts a comment References: In-Reply-To: Resent-From: Kristian Hole Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2019 20:49: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: To: 35646@debbugs.gnu.org Received: via spool by 35646-submit@debbugs.gnu.org id=B35646.157220932610704 (code B ref 35646); Sun, 27 Oct 2019 20:49:02 +0000 Received: (at 35646) by debbugs.gnu.org; 27 Oct 2019 20:48:46 +0000 Received: from localhost ([127.0.0.1]:43585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOpSw-0002mZ-AS for submit@debbugs.gnu.org; Sun, 27 Oct 2019 16:48:46 -0400 Received: from mail-lf1-f48.google.com ([209.85.167.48]:45411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOpSu-0002mJ-Mx for 35646@debbugs.gnu.org; Sun, 27 Oct 2019 16:48:45 -0400 Received: by mail-lf1-f48.google.com with SMTP id v8so6182974lfa.12 for <35646@debbugs.gnu.org>; Sun, 27 Oct 2019 13:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hole-priv-no.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=++A2nilcAEbnZHMxoI5xrsCeFekFz5jJQnObRi+Oa8w=; b=S2FEYl9nm2yqZkjhf/cDaQcETraZgKRqtmpePQfKYBMZ64DDecpi2ifh7xPFZSfbWm odVTHcgKXBvxj+hKuzaFxW+WEIouGjto5eAaHM4mY70byLqTjLqZj+tTcKiteeDAiGSF dWxHH2JfQ5lEj6YxbWbQlqjq6BT03tWvmH9OlyrvB6uLfhNt2iWEicoOn2pCbdZqPfZq vGwBqDcurjUOzkQX0nA8R/5ZLTmST+PAzKd3RxfmlNNqAaurB2v+FaKryxNtSOL6yy/u xWqjAPlncVj20dorhNskHZoWRin2ASmzwu9+nA+PTRS/1j9Aj33MXtJ6qPHLdr0fixpy /ygQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=++A2nilcAEbnZHMxoI5xrsCeFekFz5jJQnObRi+Oa8w=; b=nhJYlwPdDk36ZlRw0slbYXZbyHq3cOYPPwiq6JDuu5ImOry+6g2pDRnpTdYfqJ8FxE wleWL6q0o1ns6uDMsMMAltmRjnOs9vkjsol/KE3ifrhFgPMWvq9+Hd4IDeb1+mK7hP5D 55Q7uN84L6oTKyrNcvZ8RPLX5z+xU5MMibvfHRhqz+5QfZkCDyxnijc2QB/RjPdGx7tH eurZAEsZoLGuKSvYSo2ogDFSVv/OHsNKf9OHYPX3tr3lg24vlXe3TZiEmPaQhfTMOUXH 6aeNLxFKkua/xU6dj5Np5l6wYZPgUgAWz3PvCjhHNCBXF5CB4gNF9UMwjrRioqhK/IH/ gYDg== X-Gm-Message-State: APjAAAUVuT3gM3g4BXYYAWXA2s35wpSTrAorU7a1+ByVhSTyf64Pusw1 MS8ITnaZYekxBh1UJ1qGOm9Zz1ogTeX6yf2t9/NYsKQuGmV0YA== X-Google-Smtp-Source: APXvYqz/YgWVPLNDYNQgfYrTYkUcENac2X9bPbJSwGTujXgomRxYlxKLCjCDcyvwg+dnlNB9dIs/o/1z2vl4/a/K3fg= X-Received: by 2002:a19:4318:: with SMTP id q24mr8983532lfa.12.1572209318254; Sun, 27 Oct 2019 13:48:38 -0700 (PDT) MIME-Version: 1.0 From: Kristian Hole Date: Sun, 27 Oct 2019 21:48:26 +0100 Message-ID: Content-Type: multipart/mixed; boundary="000000000000ed7fb50595ea8152" 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 (-) --000000000000ed7fb50595ea8152 Content-Type: multipart/alternative; boundary="000000000000ed7fb20595ea8150" --000000000000ed7fb20595ea8150 Content-Type: text/plain; charset="UTF-8" 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. --000000000000ed7fb20595ea8150 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Attached is a patch that fixes this by using the foll= owing syntax-propertize-function:

(set (make-local-variable 'syn= tax-propertize-function)
=C2=A0 =C2=A0 =C2=A0(syntax-propertize-rules=C2=A0 =C2=A0 =C2=A0 ("\\(/-\\)" (1 "."))
=C2=A0 = =C2=A0 =C2=A0 ("\\(-\\*\\)" (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 t= o sql-mode.
--000000000000ed7fb20595ea8150-- --000000000000ed7fb50595ea8152 Content-Type: application/octet-stream; name="0001-Adds-sql-mode-syntax-propertize-rules-to-fix-comment.patch" Content-Disposition: attachment; filename="0001-Adds-sql-mode-syntax-propertize-rules-to-fix-comment.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k29gsae30 RnJvbSBiNmJkMGY2ZjgxMmZkYjMyMDBkZDI0MGJiOGVhYjVmNzE3YWI3YzQ0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBrYWhvbGUgPGtyaXN0aWFuQGhvbGUucHJpdi5ubz4KRGF0ZTog U3VuLCAyNyBPY3QgMjAxOSAyMToyOTo0OCArMDEwMApTdWJqZWN0OiBbUEFUQ0hdIEFkZHMgc3Fs LW1vZGUgc3ludGF4IHByb3BlcnRpemUgcnVsZXMgdG8gZml4IGNvbW1lbnQKIGhpZ2hsaWdodGlu ZwoKRml4ZXMgdGhlIGlzc3VlIHdoZXJlIC0qIGFuZCAvLSBpbmNvcnJlY3RseSBzdGFydHMgY29t bWVudHMKaW4gU1FMIG1vZGUgQnVnKCMzNTY0NikuIFRoaXMgaXMgZG9uZSBieSBhZGRpbmcgYQpz eW50YXgtcHJvcGVydGl6ZS1mdW5jdGlvbiB0byBzcWwtbW9kZS4KLS0tCiBsaXNwL3Byb2dtb2Rl cy9zcWwuZWwgfCA3ICsrKysrKysKIDEgZmlsZSBjaGFuZ2VkLCA3IGluc2VydGlvbnMoKykKCmRp ZmYgLS1naXQgYS9saXNwL3Byb2dtb2Rlcy9zcWwuZWwgYi9saXNwL3Byb2dtb2Rlcy9zcWwuZWwK aW5kZXggYjE3MzY0YjA4Zi4uNjQ1OTQ0YjM0YSAxMDA2NDQKLS0tIGEvbGlzcC9wcm9nbW9kZXMv c3FsLmVsCisrKyBiL2xpc3AvcHJvZ21vZGVzL3NxbC5lbApAQCAtNDI1Myw2ICs0MjUzLDEzIEBA IHNxbC1tb2RlCiAKICAgOzsgKHNtaWUtc2V0dXAgc3FsLXNtaWUtZ3JhbW1hciAjJ3NxbC1zbWll LXJ1bGVzKQogICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdjb21tZW50LXN0YXJ0KSAiLS0i KQorCisgIDs7IFByb3BlcnRpemUgcnVsZXMgdG8gbm90IGhhdmUgLy0gYW5kIC0qIHN0YXJ0IGNv bW1lbnRzCisgIChzZXQgKG1ha2UtbG9jYWwtdmFyaWFibGUgJ3N5bnRheC1wcm9wZXJ0aXplLWZ1 bmN0aW9uKQorICAgICAgIChzeW50YXgtcHJvcGVydGl6ZS1ydWxlcworICAgICAgICAoIlxcKC8t XFwpIiAoMSAiLiIpKQorICAgICAgICAoIlxcKC1cXCpcXCkiICgxICIuIikpKSkKKwogICA7OyBN YWtlIGVhY2ggYnVmZmVyIGluIHNxbC1tb2RlIHJlbWVtYmVyIHRoZSAiY3VycmVudCIgU1FMaSBi dWZmZXIuCiAgIChtYWtlLWxvY2FsLXZhcmlhYmxlICdzcWwtYnVmZmVyKQogICA7OyBBZGQgaW1l bnUgc3VwcG9ydCBmb3Igc3FsLW1vZGUuICBOb3RlIHRoYXQgaW1lbnUtZ2VuZXJpYy1leHByZXNz aW9uCi0tIAoyLjE4LjAKCg== --000000000000ed7fb50595ea8152-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 28 07:41:36 2019 Received: (at control) by debbugs.gnu.org; 28 Oct 2019 11:41:36 +0000 Received: from localhost ([127.0.0.1]:43955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iP3Oy-0006xt-At for submit@debbugs.gnu.org; Mon, 28 Oct 2019 07:41:36 -0400 Received: from mail-lj1-f176.google.com ([209.85.208.176]:38138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iP3Ov-0006xf-Jp for control@debbugs.gnu.org; Mon, 28 Oct 2019 07:41:34 -0400 Received: by mail-lj1-f176.google.com with SMTP id q78so10963464lje.5 for ; Mon, 28 Oct 2019 04:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hole-priv-no.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=07PW5cFLw9Y8UfG2EgYXAO+JDpDcq7qVwF9CfXbruL4=; b=R86/npbCfM1FDfJ/ko0UaqqmU0NqoZY4PgLeHaMpmuu1x9tJuyKE6RSL1AeMqIwaso OIXZQIU9dOxpkAYP2h+g/QslP+AmFvDeczQMrm4qa8cm1LBzE2LnSMoNxpxyGMAJTANX krhAB4k98Wc4W6jSH9ByywmH5R+PiDo+zwTSAkj+LSDZIFQV2tECr3JSwDlCGpNj0qUx 767BH+RnNBO2fpTWqwv/1v4ueJSK+zsxPoCoxsTyp/Nr2xik9Ef0qHWD4WmMOIpkUbaw 7lUg8ubAB1Iy7CPL5CkPdshbrD0kQ3CpquEcsAcB59QHUh+feA6FIVtsUSNNjt5JN4y5 Y1Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=07PW5cFLw9Y8UfG2EgYXAO+JDpDcq7qVwF9CfXbruL4=; b=pcyy7QeTDUpi7GriCd24xtN6ouPNm8tmrcek/HSmB4XcIE3KVyVvBU2z4kTG+m6h39 eqHQoyAmw/LQiMitwhpck/o3A3hzaJuZs5zdrTyHQ/2npenNCSesgTU8Cr+w8GL09LUu VjA+RcSYwhC2wfi2ENRZoIRaeqhvZp5ShQmsUjQmYO0uJ3bmz5pCv/c3GUVdlRT7vxuv Y/1XMtt6eiaYiCLhJT53VED3MwKR83b6jwOr6Dd1UkXRV52ou9y0T+fHAgmnpZplagki rpx9CLLB0X7Haf/cDtG8KgRYnAoR3GKyPCY/ZyVCHtAOKHFbhuOVTjtX8b783RBzSvGe n/sw== X-Gm-Message-State: APjAAAVSS4p7S4MWxbr4o76/WgNSq8087ZkgVCPlfPwPm3FRxIYBgcsf XMbrOcYC47/ZCG8I9uz0C9djfzjcqFX06ezRnuvOf7juJcyGpw== X-Google-Smtp-Source: APXvYqycnKUBAwo++nYeK+hiD/xqJSQw6aXc+pPbj5WbK58Y36rZ4nTUKyInCLKAgafL+dLeA0fdnB8OFWRvZ3GZMTk= X-Received: by 2002:a2e:5d1:: with SMTP id 200mr8328926ljf.50.1572262886585; Mon, 28 Oct 2019 04:41:26 -0700 (PDT) MIME-Version: 1.0 From: Kristian Hole Date: Mon, 28 Oct 2019 12:40:52 +0100 Message-ID: Subject: Re: In SQL mode /- incorrectly starts a comment To: control@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000d94de90595f6fa3b" X-Spam-Score: 0.0 (/) 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: -1.0 (-) --000000000000d94de90595f6fa3b Content-Type: text/plain; charset="UTF-8" tags 35646 + patch --000000000000d94de90595f6fa3b Content-Type: text/html; charset="UTF-8"
tags 35646 + patch
--000000000000d94de90595f6fa3b-- From unknown Fri Aug 22 01:03:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35646: In SQL mode /- incorrectly starts a comment Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jan 2020 19:46: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 To: Michael Mauger Cc: Kristian Hole , 35646@debbugs.gnu.org Received: via spool by 35646-submit@debbugs.gnu.org id=B35646.157954950830908 (code B ref 35646); Mon, 20 Jan 2020 19:46:02 +0000 Received: (at 35646) by debbugs.gnu.org; 20 Jan 2020 19:45:08 +0000 Received: from localhost ([127.0.0.1]:46100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itcyu-0007yQ-OX for submit@debbugs.gnu.org; Mon, 20 Jan 2020 14:45:08 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:40476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itcyp-0007ud-8p for 35646@debbugs.gnu.org; Mon, 20 Jan 2020 14:45:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To: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=1uFKJTjfMGJgmcm1rg3VULfQtTxSnJbicguPc4dkIVA=; b=WLlhBLFELjUQ31ZgxDjvgFfXVx SPoGZEyeVhMxnkM8Om8U5uck1QahABLYRy9Fkze+yH4eak8Ai64WKcBQ3VSNprFVMroO0uPdu8ZeU deog0gkPQBESeXLrpJ3UYBjzTVZ0N3nnFrF9Hu0XoMfREbEZwPWVo0rdYAPJokbNsdqzNBSfzE3MQ H2uxCo92ZiHUtDI1ZQ7ZW/o3xJGn6VNu0ai1axlzTCK8zK6ANOWw2ZEJALwD/e5qLdBch7nyE9P6+ ZetQg5E2Gl2zW++YaTMv5UGe8uPHr1d4pwaWTCNAL5q2AbEHXgOAQtbiqtNCvWf+tTTVzIWeYpy+I vjqAYvdQ==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:36514 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1itcyj-00049f-LG; Mon, 20 Jan 2020 14:44:53 -0500 From: Stefan Kangas In-Reply-To: (Kristian Hole's message of "Sun, 27 Oct 2019 21:48:26 +0100") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Mon, 20 Jan 2020 20:44:52 +0100 Message-ID: <8736c9syiz.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: 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 (-) Hi Michael, 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. Could you please take a look also at the below patch? TIA. Best regards, Stefan Kangas > > From b6bd0f6f812fdb3200dd240bb8eab5f717ab7c44 Mon Sep 17 00:00:00 2001 > From: kahole > Date: Sun, 27 Oct 2019 21:29:48 +0100 > Subject: [PATCH] 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. > --- > lisp/progmodes/sql.el | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el > index b17364b08f..645944b34a 100644 > --- a/lisp/progmodes/sql.el > +++ b/lisp/progmodes/sql.el > @@ -4253,6 +4253,13 @@ sql-mode > > ;; (smie-setup sql-smie-grammar #'sql-smie-rules) > (set (make-local-variable 'comment-start) "--") > + > + ;; Propertize rules to not have /- and -* start comments > + (set (make-local-variable 'syntax-propertize-function) > + (syntax-propertize-rules > + ("\\(/-\\)" (1 ".")) > + ("\\(-\\*\\)" (1 ".")))) > + > ;; Make each buffer in sql-mode remember the "current" SQLi buffer. > (make-local-variable 'sql-buffer) > ;; Add imenu support for sql-mode. Note that imenu-generic-expression From unknown Fri Aug 22 01:03:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35646: In SQL mode /- incorrectly starts a comment 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 To: Kristian Hole Cc: 35646@debbugs.gnu.org Received: via spool by 35646-submit@debbugs.gnu.org id=B35646.159705873616415 (code B ref 35646); Mon, 10 Aug 2020 11:26:02 +0000 Received: (at 35646) by debbugs.gnu.org; 10 Aug 2020 11:25:36 +0000 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 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=; 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 From: Lars Ingebrigtsen References: Date: Mon, 10 Aug 2020 13:25:23 +0200 In-Reply-To: (Kristian Hole's message of "Sun, 27 Oct 2019 21:48:26 +0100") Message-ID: <87h7ta7nfg.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 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 ".")) [...] 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: 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 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 10 07:25:42 2020 Received: (at control) by debbugs.gnu.org; 10 Aug 2020 11:25:42 +0000 Received: from localhost ([127.0.0.1]:34668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k55vy-0004Gz-7i for submit@debbugs.gnu.org; Mon, 10 Aug 2020 07:25:42 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k55vw-0004Gf-Dg for control@debbugs.gnu.org; Mon, 10 Aug 2020 07:25:40 -0400 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=uvOQw2x9z4KZXoqEyS+Ngek13vKwaL8Hp1dID4V0VPA=; b=m0P7Xn+rReX5E/cmTirSMUoiMs dXRKZ31KhjOuqQDDNDV8fP58VEyFXp0rI+gJYrXW27pf7FrdjInEBV3r85Z8BW3beB2DuBDwsO2hj jrGPVHlXe428hebJIrgZbbn1vuYM+vH7MbY+6IWYvVD8QiLf1PM6Xk+5cUGrjNUxfpr4=; 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 1k55vo-0003I8-KB for control@debbugs.gnu.org; Mon, 10 Aug 2020 13:25:34 +0200 Date: Mon, 10 Aug 2020 13:25:31 +0200 Message-Id: <87ft8u7nf8.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #35646 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 35646 fixed close 35646 28.1 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: 0.0 (/) 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: -1.0 (-) tags 35646 fixed close 35646 28.1 quit