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#16500: 24.3.50; Wrong font-lock backquote highlighting in plan9 rc Date: Sat, 03 Sep 2022 12:02:15 +0200 Message-ID: <871qssixnc.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="2551"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Mikhail Gusarov , 16500@debbugs.gnu.org To: Vasilij Schneidermann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 03 12:03:23 2022 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 1oUPzn-0000Rv-Ay for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Sep 2022 12:03:23 +0200 Original-Received: from localhost ([::1]:53350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUPzm-0005Pp-Ag for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Sep 2022 06:03:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUPzS-0005KQ-7p for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2022 06:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oUPzR-0008Jg-Us for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2022 06:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oUPzR-0003aR-Q7 for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2022 06:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Sep 2022 10:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16500 X-GNU-PR-Package: emacs Original-Received: via spool by 16500-submit@debbugs.gnu.org id=B16500.166219934713728 (code B ref 16500); Sat, 03 Sep 2022 10:03:01 +0000 Original-Received: (at 16500) by debbugs.gnu.org; 3 Sep 2022 10:02:27 +0000 Original-Received: from localhost ([127.0.0.1]:40996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oUPys-0003ZK-TL for submit@debbugs.gnu.org; Sat, 03 Sep 2022 06:02:27 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:45630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oUPyq-0003Z1-UO for 16500@debbugs.gnu.org; Sat, 03 Sep 2022 06:02:25 -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: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=t0BHctO26+jnXjFeyecupXgy/zfJ4AKUYQa36DY6OMM=; b=c1D5YmQEjv7CMxkMs3Ha3RBFGx Q469o5lZfVUKhPoVdA18XyVcFjJsHHTK7bvFF6S+C/pVuHL7p8azVSUQd4xx+1uwQnzGwG64hM/+N wyHJcPNlGaXy1xzMUvLSCcuqdsYsNt9DjO8ZfGyybrctJzuFhvhgydXT+E4OfMYx2pIk=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oUPyi-0006KQ-0l; Sat, 03 Sep 2022 12:02:18 +0200 In-Reply-To: (Vasilij Schneidermann's message of "Sat, 3 Sep 2022 10:22:13 +0200") X-Now-Playing: The Cure's _Three Imaginary Boys (1)_: "Foxy Lady" 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:241383 Archived-At: Vasilij Schneidermann writes: > I've run into this bug while switching all my sh/bash scripts to rc and > used the following workaround: > > (defun my-sh-set-shell-hook () > (when (member sh-shell '(rc es)) > (modify-syntax-entry ?` "."))) > > (add-hook 'sh-set-shell-hook 'my-sh-set-shell-hook) > > I doubt this warrants inclusion into sh-script.el as is, but should > demonstrate a possible approach how to fix it. But we want the {...} to be fontified as a quoted-exec, so I think the correct fix here is to make { } be a pair after ` in the rc version? That is, tweak this: (defun sh-font-lock-syntactic-face-function (state) (let ((q (nth 3 state))) (if q (if (characterp q) (if (eq q ?\`) 'sh-quoted-exec font-lock-string-face) 'sh-heredoc) font-lock-comment-face))) Possibly...