From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Hadrien Lacour Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jan 2020 10:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 39277@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1579946424767 (code B ref -1); Sat, 25 Jan 2020 10:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Jan 2020 10:00:24 +0000 Received: from localhost ([127.0.0.1]:54972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivIEq-0000CJ-8r for submit@debbugs.gnu.org; Sat, 25 Jan 2020 05:00:24 -0500 Received: from lists.gnu.org ([209.51.188.17]:40459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivIEo-0000CA-4V for submit@debbugs.gnu.org; Sat, 25 Jan 2020 05:00:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34234) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivIEm-0002KH-AC for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2020 05:00:21 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_MED, 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 1ivIEk-0001dI-If for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2020 05:00:19 -0500 Received: from mout02.posteo.de ([185.67.36.66]:57025) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ivIEj-0001WS-VM for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2020 05:00:18 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 5CE112400FC for ; Sat, 25 Jan 2020 11:00:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1579946414; bh=itgHd8WRxuvuRIw1J2Qakb+Tgt/0GwSHvJs4ME2nkUw=; h=Date:From:To:Subject:From; b=SjPQeL0uyGftJyESK28c8m9glHrCRROVjKBGcMm/WDCfO9AKSEej5DjLwcoHcnTGh N9UKfGUZn7g2z66x8Em9QTLUTo/onoT/9VQmqCjoTH0MEQwHu8HaBDo5UGDE7Y8+3P cAD3qrJXJ/zs2YIVldqRBVsnbghL0iYy8EHke0DPJhQ9W/+3qm494JWD5Uin59e1qE G5iaO8R6YmbP3iiQ/AO+5OGorTwO33G3cARwhpRiHoQzHe9rQ1Qd5uK9yAtH5LtN1O IwAX8/j8pIJ6FR5J2nNezlbyNFoKSYt+kL6a6kyWLz6/f/DWWt+vyV2jl0n8blU2v1 M/FZ4ycAZqpkQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 484Whs4x2Gz9rxK for ; Sat, 25 Jan 2020 11:00:13 +0100 (CET) Date: Sat, 25 Jan 2020 11:00:09 +0100 From: Hadrien Lacour Message-ID: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.67.36.66 X-Spam-Score: 0.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: -0.7 (/) Hello, tcl-mode's font lock (highlighting) chokes on this simple case: puts {"hello} where it considers the double quote inside the curly braces as a "quoting" character. I have confirmed it works with `emacs -Q`. In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, X toolkit) of 2019-09-23 built on gentoo-zen2700x Windowing system distributor 'The X.Org Foundation', version 11.0.12006000 System Description: Gentoo Base System release 2.6 Recent messages: Applying X config For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-silent-rules --docdir=/usr/share/doc/emacs-26.3-r1 --htmldir=/usr/share/doc/emacs-26.3-r1/html --libdir=/usr/lib64 --program-suffix=-emacs-26 --includedir=/usr/include/emacs-26 --infodir=/usr/share/info/emacs-26 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --without-compress-install --without-hesiod --without-pop --with-file-notification=inotify --enable-acl --without-dbus --without-modules --without-gameuser --without-gpm --without-kerberos --without-kerberos5 --without-lcms2 --without-xml2 --without-mailutils --without-selinux --with-gnutls --without-libsystemd --with-threads --without-wide-int --with-zlib --with-sound=no --with-x --without-ns --without-gconf --without-gsettings --without-toolkit-scroll-bars --without-gif --without-jpeg --without-png --without-rsvg --without-tiff --with-xpm --without-imagemagick --with-xft --without-cairo --without-libotf --without-m17n-flt --with-x-toolkit=lucid --without-xaw3d 'CFLAGS=-march=native -pipe -O2' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: XPM NOTIFY ACL GNUTLS FREETYPE XFT ZLIB LUCID X11 XDBE XIM THREADS Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: diff-auto-refine-mode: t linum-mode: t electric-pair-mode: t savehist-mode: t global-whitespace-mode: t show-paren-mode: t company-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t hs-minor-mode: t Load-path shadows: /home/hadrien/.emacs.d/elpa/flymake-1.0.8/flymake hides /usr/share/emacs/26.3/lisp/progmodes/flymake Features: (shadow sort vc-mtn vc-hg vc-git diff-mode easy-mmode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils company-oddmuse company-keywords company-etags etags company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-bbdb linum hideshow elec-pair savehist whitespace cc-styles cc-align cc-engine cc-vars cc-defs paren eglot array filenotify jsonrpc ert pp find-func ewoc debug xref flymake-proc flymake thingatpt warnings compile comint ansi-color ring url-util project json map company edmacro kmacro pcase deeper-blue-theme finder-inf info tex-site package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib site-gentoo time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads inotify dynamic-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 341610 9384) (symbols 48 32614 9) (miscs 40 93 178) (strings 32 113853 2521) (string-bytes 1 2844540) (vectors 16 33288) (vector-slots 8 769217 11356) (floats 8 92 262) (intervals 56 333 0) (buffers 992 12)) From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: tcl-mode does not understand quoting References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> In-Reply-To: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> Resent-From: Hadrien Lacour Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jan 2020 10:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 39277@debbugs.gnu.org Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.15799471671826 (code B ref 39277); Sat, 25 Jan 2020 10:13:01 +0000 Received: (at 39277) by debbugs.gnu.org; 25 Jan 2020 10:12:47 +0000 Received: from localhost ([127.0.0.1]:54979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivIQp-0000TO-J0 for submit@debbugs.gnu.org; Sat, 25 Jan 2020 05:12:47 -0500 Received: from mout02.posteo.de ([185.67.36.66]:51775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivIQn-0000TB-Uj for 39277@debbugs.gnu.org; Sat, 25 Jan 2020 05:12:46 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 6AF032400E6 for <39277@debbugs.gnu.org>; Sat, 25 Jan 2020 11:12:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1579947159; bh=HTSQNucd3g1i+xjaBtIzwf4/c4PDYZ1hM2t20WsWZMA=; h=Date:From:To:Subject:From; b=b3dk5vzntmqoTSwUTIdEbEzxb/SnIs5/vcGWNZlm3Uexcgg09jz8+fotbWt/NCS+z QjAYYdqiyv/NhtPRhzw4b0WS4AJO9Mwmyd/SdG/9hsRmiwG6gBekveiAgMCo3Cye21 f17wJA2DTBrmn7m0Q2EQQIe84/HZ6GcCiFlfJ0pLiK+3QMo2N1ZU3+af110oLpXjaE /WOjxs0hradbYrP8to2MYwRPhrF8q6FrEqLAlM/HnZE+WaD1T5bo0hrgwOBzFxMETe cohJeaBp77iz/gQ1iHmS5RlMcz5kYsu/ZkPZt8HjnDVdl7Rpuek141uTLfCcGi0DCK 8mXlG3/iroPBQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 484WzB3pCzz9rxb for <39277@debbugs.gnu.org>; Sat, 25 Jan 2020 11:12:38 +0100 (CET) Date: Sat, 25 Jan 2020 11:12:35 +0100 From: Hadrien Lacour Message-ID: <20200125101138.mne5qygt5ado43yt@gentoo-zen2700x> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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 (---) Sorry, the problem is even bigger than what I thought, since it affects more than the font lock. The cause is still double quotes not ignore inside curlies, but it messed indentation and parens matching too. From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: tcl-mode does not understand quoting References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> In-Reply-To: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> Resent-From: Hadrien Lacour Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jan 2020 10:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 39277@debbugs.gnu.org Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.15799496165463 (code B ref 39277); Sat, 25 Jan 2020 10:54:01 +0000 Received: (at 39277) by debbugs.gnu.org; 25 Jan 2020 10:53:36 +0000 Received: from localhost ([127.0.0.1]:54997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivJ4K-0001Q2-8U for submit@debbugs.gnu.org; Sat, 25 Jan 2020 05:53:36 -0500 Received: from mout02.posteo.de ([185.67.36.66]:32931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivJ4I-0001Pn-FC for 39277@debbugs.gnu.org; Sat, 25 Jan 2020 05:53:34 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D9D4A2400E6 for <39277@debbugs.gnu.org>; Sat, 25 Jan 2020 11:53:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1579949607; bh=uNIBUx9I7oqsbldMJPgx6N2aIaLFKZg+mg+YMgBmcSM=; h=Date:From:To:Subject:From; b=feT8fWhEZMzBUl6XgKEl/7Ohzv9/lQt17MPnIDmUPN3ONkAOjEQlID6hXJXcfYwAC CYlRVxfzHm4A2/SYAuc3zxIUg+Rq43B/CBUiv5DBZwyuRLC0GrrVay6mRG7EaNrxOz PqMKnrV3mMw0eTy04wX2PbOeNfAJHaNfnTgWaKgj7Y6PemLhvhCKrXcCa1Oyf7Vy+Q V65mQ7wt3OU4ba0+G+Vrw3utGvmujT1wBVRh8NAKtm/UGj/6+OI/W9IOH7CoL8qpfY wAq8e4JyjrNbuweBFzEJADdYzjrnxqJrVoz0YGAv9Sw61Bwu6FBGETUfEGCv8g1804 WnBkiMxsZdm/g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 484XtH0Yzxz9rxH for <39277@debbugs.gnu.org>; Sat, 25 Jan 2020 11:53:26 +0100 (CET) Date: Sat, 25 Jan 2020 11:53:22 +0100 From: Hadrien Lacour Message-ID: <20200125105322.mvrdbrdouai6ee7k@gentoo-zen2700x> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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 (---) Oh, by "it works" in the first message, I meant that it doesn't work. From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: mvar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Oct 2020 21:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Hadrien Lacour Cc: 39277@debbugs.gnu.org Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.160374624431824 (code B ref 39277); Mon, 26 Oct 2020 21:05:01 +0000 Received: (at 39277) by debbugs.gnu.org; 26 Oct 2020 21:04:04 +0000 Received: from localhost ([127.0.0.1]:41640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX9et-0008HD-Kw for submit@debbugs.gnu.org; Mon, 26 Oct 2020 17:04:04 -0400 Received: from mail-ed1-f46.google.com ([209.85.208.46]:33256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX9Lh-0005dx-UE for 39277@debbugs.gnu.org; Mon, 26 Oct 2020 16:44:14 -0400 Received: by mail-ed1-f46.google.com with SMTP id w23so11002238edl.0 for <39277@debbugs.gnu.org>; Mon, 26 Oct 2020 13:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=f8vCjxytru6tUey8UO5HaSfYNZzfPfq4PRJn3+clIUY=; b=O1s/71etk/bvaldO1htiM6IjNuMvlv9hr8WxOZTqNNOp9A4JNlWVhU1dbs6kkE9kyw 991AVShrlRJQ7P41mM6tNN6onK3vZ7njycaWoN1kdeAES1SU7R6fYXyvQCW5+6a8bPT0 puYQQ4kpuSck6OwExzCUykReZ09ew2CSnqOcE7mDdnQmdyvqRB2KVSPdl3eHntMOwbM9 8aihcmgGToxbI8DLZkxUQOJ2BSp6hr5Api6PiITfZlsLtkwocRlFKHZxrONcIabl3RRT m1v4RGPxz78DjPs0e1f5y93a/L+D3sST9nDJoLKWLsWwJBT2FhwyqetcUpo0iZHqi9Fq aBYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=f8vCjxytru6tUey8UO5HaSfYNZzfPfq4PRJn3+clIUY=; b=Qib7Ntl/xalmccWD9+XFQ59jMKZLv+NDQsmkVhZAgOlQyfWEZwIASZdqO7yenGtNdF YD7zezAQ2w4ZzVUC2ZmHpQS2Ux7O1TIxRxHyqVEKZnMI79j54o1z11bBIkhqKUg1A97O KuhCsA7zH2C6h8D252p4IQcXeze0h3IeWLNVvHfEBd1QZg25JRL2MYy4V9NbmhUhvHd7 5u2vR5Y/EPHJW5nVr+sQLq/vCaoJ9q6jLoD3MjKhgNW8mVPS839d2MPKzNsH6oY/x0wH srZSXMghKMVKotnEIuCuqV+OjwwU8JIBXDk0x9zrrr91YE2i+zsJwUBY2hu8WjT4c3w1 71Ug== X-Gm-Message-State: AOAM530Ob0h5p3iahLFMjll2v7tyz8yKU8aC5+mwJ+4umq1VKDYuoJqf 42VdDXJmii/y9yxyNLbqSJNc6q7gQcQ= X-Google-Smtp-Source: ABdhPJyYADYXE8n4e/0UQe7oFSIZAG8nR++z6ja1SkALWgASIirU/KlRuzZwIGmT8eVw4R8ZXWRrgQ== X-Received: by 2002:a05:6402:359:: with SMTP id r25mr17837606edw.308.1603745047647; Mon, 26 Oct 2020 13:44:07 -0700 (PDT) Received: from cnu407c2zx.nsn-intra.net ([2a02:2149:8812:6200:cfbb:6c67:9fe9:bcf7]) by smtp.gmail.com with ESMTPSA id l12sm5726419edj.75.2020.10.26.13.44.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Oct 2020 13:44:06 -0700 (PDT) From: mvar X-Google-Original-From: mvar References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> Date: Mon, 26 Oct 2020 22:44:03 +0200 In-Reply-To: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> (Hadrien Lacour's message of "Sat, 25 Jan 2020 11:00:09 +0100") Message-ID: <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Mon, 26 Oct 2020 17:04:01 -0400 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 (-) --=-=-= Content-Type: text/plain Hadrien Lacour writes: > Hello, tcl-mode's font lock (highlighting) chokes on this simple case: > puts {"hello} > where it considers the double quote inside the curly braces as a > "quoting" character. > I have confirmed it works with `emacs -Q`. hi Hadrien, there's some generic(?) syntactic font lock getting triggered once the doublequote character is found, that expects a closing doublequote - until then everything is locked as a string. Is this what this bug is about (it was not 100% clear to me from your initial report) ? i'm attaching a patch that works around this behavior but i don't know if it is the proper way to deal with the problem (it certainly doesn't look pretty). The idea is to insert an additional rule in tcl-syntax-propertize-function that will match the tcl-builtin-list keywords ('puts' is in there among others) plus the brackets that follow, so that if a doublequote is found in-between the brackets then there won't be any automatic string locking that would mess up the closing brackets and everything else (until another doublequote was found). Then in tcl-set-font-keywords a new rule will match the brackets and any characters inside will be locked as a string (including the single quote). --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=tcl.patch Content-Description: tcl.el patch diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 33aad2d39f..5dd02c1367 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -410,7 +410,8 @@ tcl-font-lock-keywords (defconst tcl-syntax-propertize-function (syntax-propertize-rules ;; Mark the few `#' that are not comment-markers. - ("[^;[{ \t\n][ \t]*\\(#\\)" (1 "."))) + ("[^;[{ \t\n][ \t]*\\(#\\)" (1 ".")) + ((concat "\\_<" (regexp-opt tcl-builtin-list t) "\\_>" "\s*{\\([^}].*\\)}") (2 "_"))) "Syntactic keywords for `tcl-mode'.") ;; FIXME need some way to recognize variables because array refs look @@ -506,6 +507,7 @@ tcl-set-font-lock-keywords ;; number of "namespace::" qualifiers. A leading "::" refers ;; to the global namespace. '("\\${\\([^}]+\\)}" 1 font-lock-variable-name-face) + '("{\\([^}]+\\)}" 1 font-lock-string-face) '("\\$\\(\\(?:::\\)?\\(?:[[:alnum:]_]+::\\)*[[:alnum:]_]+\\)" 1 font-lock-variable-name-face) '("\\(?:\\s-\\|^\\|\\[\\)set\\s-+{\\([^}]+\\)}" --=-=-=-- From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: (no subject) Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 08:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: mvar Cc: 39277@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.160378753127160 (code B ref 39277); Tue, 27 Oct 2020 08:33:01 +0000 Received: (at 39277) by debbugs.gnu.org; 27 Oct 2020 08:32:11 +0000 Received: from localhost ([127.0.0.1]:42733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXKOo-000740-UO for submit@debbugs.gnu.org; Tue, 27 Oct 2020 04:32:11 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXKOn-00073j-En for 39277@debbugs.gnu.org; Tue, 27 Oct 2020 04:32:10 -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:Cc:To:From:Sender:Reply-To:Subject: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=IjYgfTeN8rVwRydQHwDuOmFd4itpd/xGFc4t2M4j1S4=; b=f31Lr40BUt7a8truXm9mycYhXq Evz3ErzmqBkH5KlQqBNup31TWX4xbJRMCfOvOj61YP3A4ym2PqXDryG7eMpeZGtHI6bNOHLKlddKZ 3wjF5PYefqW/iXf7mzpl0K2ZwZBHAfDhWlerCXPW4mRVCuVIxZ46w2WD9dfbEQfg9+Mo=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXKOd-0004Tq-3M; Tue, 27 Oct 2020 09:32:02 +0100 From: Lars Ingebrigtsen References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> X-Now-Playing: Normil Hawaiians's _In the Stone_: "In The Stone" Date: Tue, 27 Oct 2020 09:31:57 +0100 In-Reply-To: <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> (mvar's message of "Mon, 26 Oct 2020 22:44:03 +0200") Message-ID: <87y2jsqdc2.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: mvar writes: > there's some generic(?) syntactic font lock getting triggered once the > doublequote character is found, that expects a closing doublequote - > until then everything is locked as a string. Is this w [...] Content analysis details: (-1.1 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] 1.8 MISSING_SUBJECT Missing Subject: header X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: mvar writes: > there's some generic(?) syntactic font lock getting triggered once the > doublequote character is found, that expects a closing doublequote - > until then everything is locked as a string. Is this w [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [95.216.78.240 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 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 (+) mvar writes: > there's some generic(?) syntactic font lock getting triggered once the > doublequote character is found, that expects a closing doublequote - > until then everything is locked as a string. Is this what this bug is > about (it was not 100% clear to me from your initial report) ? i'm > attaching a patch that works around this behavior but i don't know if > it is the proper way to deal with the problem (it certainly doesn't > look pretty). I'm not sure, either -- it's been a while since I did Tcl programming, but this change doesn't seem very invasive at least, and fixes this specific problem, so I've applied it to Emacs 28. This change was small enough to apply without assigning copyright to the FSF, but for future patches you want to submit, it might make sense to get the paperwork started now, so that subsequent patches can be applied speedily. Would you be willing to sign such paperwork? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 04:32:18 2020 Received: (at control) by debbugs.gnu.org; 27 Oct 2020 08:32:18 +0000 Received: from localhost ([127.0.0.1]:42737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXKOw-00074P-6K for submit@debbugs.gnu.org; Tue, 27 Oct 2020 04:32:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXKOu-000747-I5 for control@debbugs.gnu.org; Tue, 27 Oct 2020 04:32:17 -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=JtQnMO9iTW5TL++j3jfKbohp11thrBUM+4qoDd40hnw=; b=SHXd8RNUmHXdsu7v0/jUqOPa6Z xAfy5RNXwHe2LbeAfqN2uQmZZR5k3GYAc54FsrePgQ2FTkQNnzgd3KnH09A16+oPrcGmGdRVKLbmw nuOc7YeXZQY7BVZqYrfnzbPiK78iLs3eFlOmaLD9Rzg+gIkF2dMu7MkJgqoJjI1KGQ6g=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXKOm-0004U2-Qq for control@debbugs.gnu.org; Tue, 27 Oct 2020 09:32:11 +0100 Date: Tue, 27 Oct 2020 09:32:07 +0100 Message-Id: <87wnzcqdbs.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #39277 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 39277 fixed close 39277 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 39277 fixed close 39277 28.1 quit From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 08:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: mvar Cc: 39277@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.16037886824682 (code B ref 39277); Tue, 27 Oct 2020 08:52:01 +0000 Received: (at 39277) by debbugs.gnu.org; 27 Oct 2020 08:51:22 +0000 Received: from localhost ([127.0.0.1]:42789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXKhO-0001DS-3a for submit@debbugs.gnu.org; Tue, 27 Oct 2020 04:51:22 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:57126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXKhM-0001DJ-9m for 39277@debbugs.gnu.org; Tue, 27 Oct 2020 04:51:20 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CL55z013Rz1qt4C; Tue, 27 Oct 2020 09:51:18 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CL55y5DtTz1qtYr; Tue, 27 Oct 2020 09:51:18 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id TJw5y9x0x1UW; Tue, 27 Oct 2020 09:51:18 +0100 (CET) X-Auth-Info: dswPw6KrRhhOXKNZeGV5ujaqTUeLXpNRBTGhrgM/k2ybxBciO7d0RxJjPZnltZiD Received: from igel.home (ppp-46-244-161-64.dynamic.mnet-online.de [46.244.161.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 27 Oct 2020 09:51:17 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 94A6F2C0A66; Tue, 27 Oct 2020 09:51:17 +0100 (CET) From: Andreas Schwab References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> Date: Tue, 27 Oct 2020 09:51:17 +0100 In-Reply-To: <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> (mvar's message of "Mon, 26 Oct 2020 22:44:03 +0200") Message-ID: <87eelkcare.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) 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.4 (-) On Okt 26 2020, mvar wrote: > diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el > index 33aad2d39f..5dd02c1367 100644 > --- a/lisp/progmodes/tcl.el > +++ b/lisp/progmodes/tcl.el > @@ -410,7 +410,8 @@ tcl-font-lock-keywords > (defconst tcl-syntax-propertize-function > (syntax-propertize-rules > ;; Mark the few `#' that are not comment-markers. > - ("[^;[{ \t\n][ \t]*\\(#\\)" (1 "."))) > + ("[^;[{ \t\n][ \t]*\\(#\\)" (1 ".")) > + ((concat "\\_<" (regexp-opt tcl-builtin-list t) "\\_>" "\s*{\\([^}].*\\)}") (2 "_"))) > "Syntactic keywords for `tcl-mode'.") > > ;; FIXME need some way to recognize variables because array refs look > @@ -506,6 +507,7 @@ tcl-set-font-lock-keywords > ;; number of "namespace::" qualifiers. A leading "::" refers > ;; to the global namespace. > '("\\${\\([^}]+\\)}" 1 font-lock-variable-name-face) > + '("{\\([^}]+\\)}" 1 font-lock-string-face) That mishandles nested or quoted braces. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 08:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Andreas Schwab Cc: mvar , 39277@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.16037890335359 (code B ref 39277); Tue, 27 Oct 2020 08:58:02 +0000 Received: (at 39277) by debbugs.gnu.org; 27 Oct 2020 08:57:13 +0000 Received: from localhost ([127.0.0.1]:42829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXKn3-0001ON-4c for submit@debbugs.gnu.org; Tue, 27 Oct 2020 04:57:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXKn1-0001O8-84 for 39277@debbugs.gnu.org; Tue, 27 Oct 2020 04:57:11 -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=qkBBBKbbPtMyea1/8UBd13wOj/NZ+Po8Uq/MzD/uoUw=; b=Bkgwe6Ics0LeeGTCUxRxab73ML OQe51dYNl4PpAMMLG5F3voatVZt6wzvDBj7tLu+FrtrIkfQuc1csNxanmzcOsXqzR9L8c4t1Mjdht GmiTryVknSXAap20y6a2jLZUmNXsdisU1FesmxoHdUP/AzKaEy+UDS80nbMIHSzqh64w=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXKmo-0004qD-Rd; Tue, 27 Oct 2020 09:57:04 +0100 From: Lars Ingebrigtsen References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <87eelkcare.fsf@igel.home> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUDCA4TPV4pltr/ //8poGfDAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QKGwg3IV7U2tkAAAGCSURBVCjPVdDBattAEAbg f4S1UJ1MkUuzZx/MPsVIJDn0pIBtSE4+pMXRUyx5AqU4l5yUshLaecrOyqVxFgzzsZ79RwMw7pkO KOqXDrdsxp4CTP3SI2f3e8pOMM/dGuB2jHSNq677hshWAhaKfoVTJRIV1vd3oFpEgNLw0OBrNWND VbgGcQJtYUODMN8QKZawioFp720AflR7ee2p5YSbahAN2qDYArjVnrA4wihi3Y4S8gmmBLpaRunM hC8KzYniCfPJ2L22/lzrjX0TTpURDGzHNtUlRF90wzHhES1I+3utD+XC4V3E8opxQO7wR0ZfuoAG eQuduX9yEy2xKBQxRhezlb4N6APyINlS88Eyiewlf9R8zVX8SqAOecJPMWuqGu2ZnBwlX4M8dhKs bJyORjqu9ObtaJG+U3N8JtsijcoK/TUFlomNLtr5TGfTUymsJ240BieF8WnzO57/lnlkusIdMjkv RnssHv5Bz5Xu9z9K7D4A3F0Cl/h+Bl/efMI82l8H1Y4g455PLAAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMC0xMC0yN1QwODo1NTozMiswMDowMJRTl6cAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTAt MjdUMDg6NTU6MzIrMDA6MDDlDi8bAAAAAElFTkSuQmCC X-Now-Playing: Big in Japan's _From Y to Z and never again_: "Taxi" Date: Tue, 27 Oct 2020 09:56:57 +0100 In-Reply-To: <87eelkcare.fsf@igel.home> (Andreas Schwab's message of "Tue, 27 Oct 2020 09:51:17 +0100") Message-ID: <87h7qgqc6e.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: Andreas Schwab writes: > That mishandles nested or quoted braces. Yes... but is it any worse than it was? Not in the cases I was looking at, but perhaps I wasn't looking at the right examples. 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 (-) Andreas Schwab writes: > That mishandles nested or quoted braces. Yes... but is it any worse than it was? Not in the cases I was looking at, but perhaps I wasn't looking at the right examples. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 13:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: mvar Cc: 39277@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.16038052757860 (code B ref 39277); Tue, 27 Oct 2020 13:28:02 +0000 Received: (at 39277) by debbugs.gnu.org; 27 Oct 2020 13:27:55 +0000 Received: from localhost ([127.0.0.1]:43310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXP11-00022h-DG for submit@debbugs.gnu.org; Tue, 27 Oct 2020 09:27:55 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXP0z-00022U-2U for 39277@debbugs.gnu.org; Tue, 27 Oct 2020 09:27:53 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9495744072E; Tue, 27 Oct 2020 09:27:47 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3D27844071A; Tue, 27 Oct 2020 09:27:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1603805266; bh=Wd85WEaYjnz4HNIzQXzFmi9ojrZZKzN9gCfyYjvsJI4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=JGWolK8tWrKRiqPMG172YLY/rQt3kqokynkzwU9VWs8v3TKCoJC1IyAAwhGfqkG2e KPTeAHpwv7i5y+mIXevUH8L/QBtQ5DkO3ide5rxjako4Xba6/PTc+lhj85Dticlv3o ZlkJzdEGcqSBsjQOqocdHjNNgr2mhoNSFeerW6X5FrvYejJDLn8OGSC0ooJ9gCk9us xTXLuHgyuUTrxohCmjeDF1EA26mUycgJ8+/RIaG5udTYukOTXZmd5UXvYr1yi4fPj6 6lntjY6+OyTHy9NK+GoZfPKjd6riTByeYJRHlIUrZ2N8QjTXyRFVzc9qyZCLywOaIW 4edZUIC0AU8+Q== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0052C12016D; Tue, 27 Oct 2020 09:27:45 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> Date: Tue, 27 Oct 2020 09:27:45 -0400 In-Reply-To: <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> (mvar's message of "Mon, 26 Oct 2020 22:44:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.073 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: 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 (---) >> Hello, tcl-mode's font lock (highlighting) chokes on this simple case: >> puts {"hello} >> where it considers the double quote inside the curly braces as a >> "quoting" character. >> I have confirmed it works with `emacs -Q`. > there's some generic(?) syntactic font lock getting triggered once the > doublequote character is found, that expects a closing doublequote - until then > everything is locked as a string. Is this what this bug is about (it was not > 100% clear to me from your initial report) ? i'm attaching a patch that works > around this behavior but i don't know if it is the proper way to deal with the > problem (it certainly doesn't look pretty). It's been too long since I last had to deal with Tcl so I can't remember the rules. The patch you submitted is most likely not "correct" in the sense that it still leaves many cases that are mishandled. Could someone remind me how " and {..} interact in Tcl? E.g. proc foo1 () { puts "hello" } prints "hello" (without the quotes)? And proc foo2 () { puts {"hello} } prints "hello (with the quote)? And what about proc foo3 () { puts "hello}" } proc foo4 () { puts "hello\}" } proc foo5 () { puts "hello } > The idea is to insert an additional > rule in tcl-syntax-propertize-function that will match the tcl-builtin-list I'm thinking that maybe a better option is to catch all " in tcl-syntax-propertize-function and for every one of them see if they're "closing" a string and if not, check whether they're closed by a } before a matching " and if so mark them as "not opening a string". > + '("{\\([^}]+\\)}" 1 font-lock-string-face) Won't this catch cases not usually considered as strings, like proc foo5 () { return 6 } ? Stefan From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> In-Reply-To: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> Resent-From: Hadrien Lacour Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 15:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: 39277@debbugs.gnu.org Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.160381230121148 (code B ref 39277); Tue, 27 Oct 2020 15:25:02 +0000 Received: (at 39277) by debbugs.gnu.org; 27 Oct 2020 15:25:01 +0000 Received: from localhost ([127.0.0.1]:45476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXQqK-0005V1-Ih for submit@debbugs.gnu.org; Tue, 27 Oct 2020 11:25:00 -0400 Received: from mout01.posteo.de ([185.67.36.65]:33255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXQqI-0005Un-AA for 39277@debbugs.gnu.org; Tue, 27 Oct 2020 11:24:59 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id DAD2D160061 for <39277@debbugs.gnu.org>; Tue, 27 Oct 2020 16:24:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1603812291; bh=OPAaA6i5dBoDSiJy/huC07HLa4S00jYRn6CFw9Vsy8o=; h=Date:From:To:Subject:From; b=aqgYtOgp0cZq7mbUuffIqnUM1Zmbt0LbcLIobbPWJU+t//3ecVbKDzC27m8RpT5bC XX3Ln9jM7uQpvAdt1shJjp+2GFRmALtoAeKrkrGfpoFGb6sQhsdPhzwOHUEa9wJER8 DbMVjwZ6SL6Vz2hvmkdtkuxQYxKwnz63C8JcruzjOg+tiNX7pivMByHJ0kQEXFqgug s1xy5vu+jEIq3urT+ORolxi68hUetIKMB2HzOmmPWt5rlWpkKpNcsBpYevbR4GZBYZ WiSyrxbiXfyu8RZx9/ykhYslfKXgsBssdUA2wDwpN1pbdtpRKjuF7Tj6W7BWW1Zuxu 3KzbzytuH3Hvw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4CLFr32fFPz9rxb for <39277@debbugs.gnu.org>; Tue, 27 Oct 2020 16:24:51 +0100 (CET) Date: Tue, 27 Oct 2020 16:24:48 +0100 From: Hadrien Lacour Message-ID: <20201027152448.ddkpa6oelcql22rb@gentoo-zen2700x> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 (---) Sorry for not really contributing, I must provid the excuse that I don't have enough time or energy right now. About Tcl syntax rules, Tcl(3tcl) (or Tcl(n) on gentoo) explains it simply: ... [4] Double quotes. If the first character of a word is double-quote (“"”) then the word is terminated by the next double-quote character. If semi-colons, close brackets, or white space characters (including newlines) appear between the quotes then they are treated as ordinary characters and included in the word. Command substitution, variable substitution, and backslash substitution are performed on the characters between the quotes as described below. The double-quotes are not retained as part of the word. ... [6] Braces. If the first character of a word is an open brace (“{”) and rule [5] does not apply, then the word is terminated by the matching close brace (“}”). Braces nest within the word: for each additional open brace there must be an additional close brace (however, if an open brace or close brace within the word is quoted with a backslash then it is not counted in locating the matching close brace). No substitutions are performed on the characters between the braces except for backslash-newline substitutions described below, nor do semi-colons, newlines, close brackets, or white space receive any special interpretation. The word will consist of exactly the characters between the outer braces, not including the braces themselves. ... To put simply, braces act like sh's single quotes and double quotes are basically the same (only $ or [] is substituted). From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 17:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Stefan Monnier Cc: mvar , 39277@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.16038207622526 (code B ref 39277); Tue, 27 Oct 2020 17:47:01 +0000 Received: (at 39277) by debbugs.gnu.org; 27 Oct 2020 17:46:02 +0000 Received: from localhost ([127.0.0.1]:45639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXT2o-0000eg-4F for submit@debbugs.gnu.org; Tue, 27 Oct 2020 13:46:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXT2m-0000e6-1P for 39277@debbugs.gnu.org; Tue, 27 Oct 2020 13:46:00 -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=DMqlyzbFOqFVV8MiMlsxGYABElAGlBZ0kaxP2zVaSxY=; b=s3j/X4q6hBI24wqlfPW5Wr7RQ/ h9mUAfwrGBUECJwk5+OM/uAYtC90gn9/eEpLKYO8tOl4HivQcW632/FZ4lHnf/yAhOLmJdSMAgS1G wrDfDC4n2rK4+N0otwTV7mTq5pXyYSuD33Vhfa7AfNTuYwfNgIWqgJGk9+UIu/wb52ZQ=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXT2c-000216-DS; Tue, 27 Oct 2020 18:45:53 +0100 From: Lars Ingebrigtsen References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEU3Mi9PSUWso5T/ ///RB2lhAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QKGxEsGLsQAbQAAAFOSURBVCjPTZBNihtBDIWf oCswWZWhFGKfRoapWUsgLTwH8CL3SWC8ymYMrlNG1W17oqZ/Pr3X0usGXpvxvoSFOmo0+3HiCQLl Vr/9jJCwjup8GeM2/nxMaIfL+Ey42duEMZXxaS9odT/G5XY+r6D1/fIrhZiAOlY4+QsKMMaq+B4H itv5eh2nj1QOb2Ncx6y/33H6ggP6Hd5X0Oq7COXfr3scJ3gIx1JQNQ9zsHlBSPW6MxRP4LooOG2u AEtC2lxdMo5UQNHsOG+i88qBChNqyKKeDhFsJWiPBxDS9ihaIE8ouMMyz0IbxMRyt8wkdyBlU2zb QMHhmXqbbNQVvZGvszQCJXQaCdy9sDqvAxDOrBYJTfILmaTMpW3uyG6xhGwu4DLtCUDPYc/Ilpps S+nYO9uWmSh6xBp2DZflj1d26HPj1z/Y/QdEzzYWytzyD2STbARTtGPFAAAAJXRFWHRkYXRlOmNy ZWF0ZQAyMDIwLTEwLTI3VDE3OjQ0OjI0KzAwOjAwrxoivgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAy MC0xMC0yN1QxNzo0NDoyNCswMDowMN5HmgIAAAAASUVORK5CYII= X-Now-Playing: Vladislav Delay, Sly Dunbar, Robbie Shakespeare's _500-PUSH-UP_: "(512)" Date: Tue, 27 Oct 2020 18:45:48 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 27 Oct 2020 09:27:45 -0400") Message-ID: <875z6v36lv.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: Stefan Monnier writes: > And what about > > proc foo3 () { > puts "hello}" > } > > proc foo4 () { > puts "hello\}" > } > > proc foo5 () { > puts "hello > } It's fortunately been a couple of decades since I wrote Tcl, and... I don't remember. :-/ 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 (-) Stefan Monnier writes: > And what about > > proc foo3 () { > puts "hello}" > } > > proc foo4 () { > puts "hello\}" > } > > proc foo5 () { > puts "hello > } It's fortunately been a couple of decades since I wrote Tcl, and... I don't remember. :-/ > Won't this catch cases not usually considered as strings, like > > proc foo5 () { > return 6 > } Yup. I'll revert the patch and reopen this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 13:46:25 2020 Received: (at control) by debbugs.gnu.org; 27 Oct 2020 17:46:25 +0000 Received: from localhost ([127.0.0.1]:45642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXT3B-0000fT-EK for submit@debbugs.gnu.org; Tue, 27 Oct 2020 13:46:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXT2x-0000f4-AJ for control@debbugs.gnu.org; Tue, 27 Oct 2020 13:46:24 -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=keu0PXX1X1LcAuzvzxCUN+lyzYq6g9e4nu/tjayWlBw=; b=fgJq2OCtpWYZsZTYUJmMcVENQg OCB8tzkebq2cA5Vok05VtNY5ULw5DRofETYx/1vyNCR9djzca/r3WkVjS1JxhayC8QFy1L4+kkJ4J Rq9kkNrt46EsWT9+Bs7a0uxFN/rqN4Lv2CqkrU06XszJ/ndBKLKMcahtOFy9a7UGe7HM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXT2p-00021M-H0 for control@debbugs.gnu.org; Tue, 27 Oct 2020 18:46:05 +0100 Date: Tue, 27 Oct 2020 18:46:02 +0100 Message-Id: <874kmf36lh.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #39277 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: reopen 39277 tags 39277 - fixed patch 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 (-) reopen 39277 tags 39277 - fixed patch quit From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: mvar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 20:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: mvar , 39277@debbugs.gnu.org, Stefan Monnier , Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.160383137728121 (code B ref 39277); Tue, 27 Oct 2020 20:43:02 +0000 Received: (at 39277) by debbugs.gnu.org; 27 Oct 2020 20:42:57 +0000 Received: from localhost ([127.0.0.1]:46081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVo0-0007JU-L3 for submit@debbugs.gnu.org; Tue, 27 Oct 2020 16:42:56 -0400 Received: from mail-ed1-f51.google.com ([209.85.208.51]:36900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVnz-0007JH-6X for 39277@debbugs.gnu.org; Tue, 27 Oct 2020 16:42:55 -0400 Received: by mail-ed1-f51.google.com with SMTP id o18so2869435edq.4 for <39277@debbugs.gnu.org>; Tue, 27 Oct 2020 13:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rrwpnPOnzaE4PnHWFvNP1ty1Y/nZt0ilHkQA7v2vuXE=; b=gUv88+NfVTUkL7VQbXPtaYu4bvvpMePYAfRDv39sPUXTBjAEJ/pVF2ouPLr7fX1OA4 60tzYhqwQJyBNsqqJi4jKGqCKWixwqn2mpg8q3SLTDQHD7LZk5X6C9Lc3Lu+nRxdneSz FAOXOFetuLAsl/1H3A1DZ7sjFaqwwBkytQuwNtqZ4lBjfhZiE4B5MnPjIAocnfatoGCF MKwU5UkJeWh/CyE+e5XuU7tYY7lIlRttoehsgWHwfHOqKEoFo5+FWuGkDTJwTGIRjzqp RoNoSBmv8cRGJKknPcUM7lvOGl2plFIFpNCSdaoXWCeVEjrk3dK+PZFtc3YbqrVbevY/ iEew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=rrwpnPOnzaE4PnHWFvNP1ty1Y/nZt0ilHkQA7v2vuXE=; b=NPpom2SW5U4A6y4rvWz34Izju2wLzq6t32ThOdr8QUDpOQNuDHNFvYSEvJP76xMt2E k36hFXsLGBh9wFb7llq4Zb/wgtzc/idKKmU3VXzLANi/aYB816qKfScaGyi/qeY1EvaM BAEzrXZhO2s9s8o3PdVRCFcezIeVkM5Ti33YWTdyky9AwrXVirzxVFfxZ7Y5ixe7xzXn xtIF6rsZWlMG7YVbL8Urw3ae2eLlEkCVpFxCWC2rCw0k+SYaYML7WuBYHlr5wScVLmDE sjvKw+u8kzxOka0ajalUaivrtLPvm7Etshl7D4tnKZcdDZKGfHM23XJfJDPVhspFHLmL H0xw== X-Gm-Message-State: AOAM5334UwOAVWSvWCezvX9137IUwyQhoMuxfr663BQMLQLLqHxEWoR5 DS/8G/ooeDLPyDXfa+jdLLs= X-Google-Smtp-Source: ABdhPJxxtjv10bg7SW4kvzKFI//ZabVL9q0V1GPmR+BWpJf3MyFw6eRLL+By/ASFem5OAsKS9TvOtA== X-Received: by 2002:a05:6402:156:: with SMTP id s22mr4299913edu.178.1603831369330; Tue, 27 Oct 2020 13:42:49 -0700 (PDT) Received: from cnu407c2zx.nsn-intra.net ([2a02:2149:8812:6200:cfbb:6c67:9fe9:bcf7]) by smtp.gmail.com with ESMTPSA id f23sm1657020ejd.5.2020.10.27.13.42.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Oct 2020 13:42:47 -0700 (PDT) From: mvar X-Google-Original-From: mvar References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> Date: Tue, 27 Oct 2020 22:42:44 +0200 In-Reply-To: <875z6v36lv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 27 Oct 2020 18:45:48 +0100") Message-ID: <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 (-) Lars Ingebrigtsen writes: > Stefan Monnier writes: > >> And what about >> >> proc foo3 () { >> puts "hello}" >> } >> >> proc foo4 () { >> puts "hello\}" >> } >> >> proc foo5 () { >> puts "hello >> } > > It's fortunately been a couple of decades since I wrote Tcl, and... I > don't remember. :-/ > >> Won't this catch cases not usually considered as strings, like >> >> proc foo5 () { >> return 6 >> } > > Yup. I'll revert the patch and reopen this bug report. thank you Lars for reverting, this didn't feel right anyway. I'll try to come up with some more elegant solution or at least find some way to skip breaking the other locks - for example moving the tcl-font-lock-keywords regexp to the end of that list solves the problem Stefan mentioned but it still doesn't address what Andreas pointed out, i.e. proc test (args) will have args locked as a string. btw to answer your previous email, i'd like to sign the copyright paperwork thanks, Michalis From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 20:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: mvar Cc: 39277@debbugs.gnu.org, Stefan Monnier , Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.160383163628564 (code B ref 39277); Tue, 27 Oct 2020 20:48:01 +0000 Received: (at 39277) by debbugs.gnu.org; 27 Oct 2020 20:47:16 +0000 Received: from localhost ([127.0.0.1]:46089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVsC-0007Qe-Fj for submit@debbugs.gnu.org; Tue, 27 Oct 2020 16:47:16 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXVsA-0007QQ-Jk for 39277@debbugs.gnu.org; Tue, 27 Oct 2020 16:47:15 -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=FFV2dmfMO/jJoNWES9N6yh8XPql92dWII3iryjDLYB4=; b=QkRT5A4CSDXLIG3Y7sMOo4Umio HKL9AcPNlhhDufn9RxbziMUwdtUtJuAWtNxXtDvh1DaxaeejAQw3dYMqfV4XT/I0YrhUYpPO88/ax CFF2yW5k5EsTm4Vdnqh9Qi/rK7UJznv4Ai+15dbUNtz7bokx6CK7MkIn5WVr9cS11mAs=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXVrz-0006Bk-PK; Tue, 27 Oct 2020 21:47:07 +0100 From: Lars Ingebrigtsen References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEX+7FH87WPLrEaO bDWwjDpNGyhUJSqphUpkNi5ySy5sRUbLrD2LYEv////M2cpMAAAAAWJLR0QN9rRh9QAAAAd0SU1F B+QKGxQJIQotm7AAAAGDSURBVDjLdZRBbsIwEEVzhPYI0CXLtAvWiN7AI7quZmSWHALLZouEiHoB FHEDrpBDdewZJ04IP1kkfh7/8UziqprRO6v6qGe1qLZGBGgMml6HakuiXR2a+rzWt6OCGGHJsxRg BIbiEnhq2/aGPGkAsrTOJQMZIA2eiWQgJiBTSw9MI0CGJuB37WJWRBOAf5u6uXo00wisDYRzvVm7 wiWBBqK3b1gOSo99Stwk6HTBBH6QU0KIEIIPrgBoKM7km92+erBDRGBflIJcCpAcSI39YB5Lij2w o6yiNU0AeiCQaolcBgGk1BnaDGxeCh15kJAekHjgmQZA+6Kqn04Slp3T0Ker5iUbPBoY9SmDOM1J +uPWkh0+tHHEaGge9Pj4DNwrYF+ClKCb8fCO2RyIwxF8P0VEk2MJIAcwKCO0tdbGtWaz4gIpQP3v +q5b3UcT+OL7yp914KfmorXyPviR3FDEU9vd267tbvfOpYod9MgoGoj6164equVqWWhRPWaOpTc+ lv4BOsy5elBuQLgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMTAtMjdUMjA6MDk6MzMrMDA6MDDi IscfAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEwLTI3VDIwOjA5OjMzKzAwOjAwk39/owAAAABJ RU5ErkJggg== X-Now-Playing: The Unthanks's _Diversions, Vol 1: The Songs Of Robert Wyatt And Antony & The Johnsons_: "Free Will And Testament" Date: Tue, 27 Oct 2020 21:47:02 +0100 In-Reply-To: <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> (mvar's message of "Tue, 27 Oct 2020 22:42:44 +0200") Message-ID: <878sbrxupl.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: mvar writes: > btw to answer your previous email, i'd like to sign the copyright paperwork (Sent off-list.) 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 (-) mvar writes: > btw to answer your previous email, i'd like to sign the copyright paperwork (Sent off-list.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Oct 2020 22:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: mvar Cc: Lars Ingebrigtsen , 39277@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.160383895416033 (code B ref 39277); Tue, 27 Oct 2020 22:50:02 +0000 Received: (at 39277) by debbugs.gnu.org; 27 Oct 2020 22:49:14 +0000 Received: from localhost ([127.0.0.1]:46329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXXmD-0004AX-RO for submit@debbugs.gnu.org; Tue, 27 Oct 2020 18:49:14 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXXmC-0004AJ-E5 for 39277@debbugs.gnu.org; Tue, 27 Oct 2020 18:49:13 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A0EF4440822; Tue, 27 Oct 2020 18:49:06 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DBB20440811; Tue, 27 Oct 2020 18:49:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1603838944; bh=/r6CfwJL9tcBjk7kv89rRznbFvxmKHf+C5gOLVHJVPQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QUt4jTs3qltty5fVoo/AzYSxrDkXpo08jmVNo23B4v2NnXPkD3Y3CVnEnnC0Lsveg U+g813nIhHJpdN3AeNynSZ+E7vfxIwrYANpcC4LgeqeE0hQn0d9Z2wJz4OGMzy0E1O /Ep0wPLlcxj2clx2vBiKJXrNU473PNq0ThDs1tjD98yp3OHI6EGaxkgKVOfUBQwbtG 6C/JxxCD+tdIy1OK5QzOa3nZ4hXYJUxfQ6sOdIYzTeibleHAbHRVFmv/zvLiV3Uj8T 2TJbqSvv3MT6JTIG3ozo7hRD4ZEnqrupe3GSJUqeWLU8tmF8TJnkC1vCpQpeTKyhx4 0o7UUkOX0k/lA== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A9AF81203AD; Tue, 27 Oct 2020 18:49:04 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> Date: Tue, 27 Oct 2020 18:48:56 -0400 In-Reply-To: <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> (mvar's message of "Tue, 27 Oct 2020 22:42:44 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.075 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: 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 (---) > thank you Lars for reverting, this didn't feel right anyway. I'll try to come up > with some more elegant solution or at least find some way to skip > breaking the other locks - for example moving the tcl-font-lock-keywords > regexp to the end of that list solves the problem Stefan mentioned but it > still doesn't address what Andreas pointed out, i.e. proc test (args) will > have args locked as a string. How 'bout the patch below? Stefan diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 717008a0a2..d4d51e8b50 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -407,10 +407,64 @@ tcl-font-lock-keywords `tcl-typeword-list', and `tcl-keyword-list' by the function `tcl-set-font-lock-keywords'.") +(eval-and-compile + (defconst tcl--word-delimiters "[;{ \t\n")) + +(defun tcl--syntax-of-quote (pos) + "Decide whether a double quote opens a string or not." + ;; This is pretty tricky, because strings can be written as "..." + ;; or as {...} or without any quoting at all for some simple and not so + ;; simple cases (e.g. `abc' but also `a"b'). To make things more + ;; interesting, code is represented as strings, so the content of + ;; strings can be later re-lexed to find nested strings. + (save-excursion + (let ((ppss (syntax-ppss pos))) + (cond + ((nth 8 ppss) nil) ;; Within a string or a comment. + ((not (memq (char-before pos) + (cons nil + (eval-when-compile + (mapcar #'identity tcl--word-delimiters))))) + ;; The double quote appears within some other lexical entity. + ;; FIXME: Similar treatment should be used for `{' which can appear + ;; within non-delimited strings (but only at top-level, so + ;; maybe it's not worth worrying about). + (string-to-syntax ".")) + ((zerop (nth 0 ppss)) + ;; Not within a { ... }, so can't be truncated by a }. + ;; FIXME: The syntax-table also considers () and [] as paren + ;; delimiters just like {}, even though Tcl treats them differently. + ;; Tho I'm not sure it's worth worrying about, either. + nil) + (t + ;; A double quote within a {...}: leave it as a normal string + ;; delimiter only if we don't find a closing } before we + ;; find a closing ". + (let ((type nil) + (depth 0)) + (forward-char 1) + (while (and (not type) + (re-search-forward "[\"{}\\]" nil t)) + (pcase (char-after (match-beginning 0)) + (?\\ (forward-char 1)) + (?\" (setq type 'matched)) + (?\{ (cl-incf depth)) + (?\} (if (zerop depth) (setq type 'unmatched) + (cl-incf depth))))) + (when (> (line-beginning-position) pos) + ;; The quote is not on the same line as the deciding + ;; factor, so make sure we revisit this choice later. + (put-text-property pos (point) 'syntax-multiline t)) + (when (eq type 'unmatched) + ;; The quote has no matching close because a } closes the + ;; surrounding string before, so it doesn't really "open a string". + (string-to-syntax ".")))))))) + (defconst tcl-syntax-propertize-function (syntax-propertize-rules ;; Mark the few `#' that are not comment-markers. - ("[^;[{ \t\n][ \t]*\\(#\\)" (1 "."))) + ((concat "[^" tcl--word-delimiters "][ \t]*\\(#\\)") (1 ".")) + ("\"" (0 (tcl--syntax-of-quote (match-beginning 0))))) "Syntactic keywords for `tcl-mode'.") ;; FIXME need some way to recognize variables because array refs look @@ -593,6 +647,8 @@ tcl-mode '(tcl-font-lock-keywords nil nil nil beginning-of-defun)) (set (make-local-variable 'syntax-propertize-function) tcl-syntax-propertize-function) + (add-hook 'syntax-propertize-extend-region-functions + #'syntax-propertize-multiline 'append 'local) (set (make-local-variable 'imenu-generic-expression) tcl-imenu-generic-expression) diff --git a/test/manual/indent/tcl.tcl b/test/manual/indent/tcl.tcl new file mode 100644 index 0000000000..447b64cf1c --- /dev/null +++ b/test/manual/indent/tcl.tcl @@ -0,0 +1,19 @@ + +puts "hello}"; # Top-level strings can contain unescaped closing braces! + +puts a"b; # Non-delimited strings can contain quotes! +puts a""b; # Even several of them! + +proc foo1 {} { + puts "hello"; # Normal case! + puts "hello\}; # This will signal an error when `foo1` is called! +} + +proc foo1 {} { + puts "hello; # This will also signal an error when `foo1` is called! +} + +proc foo1 {} { + puts a"b; # This will not signal an error! + puts a""b"; # And that won't either! +} From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Oct 2020 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: mvar Cc: Lars Ingebrigtsen , 39277@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.16039931709949 (code B ref 39277); Thu, 29 Oct 2020 17:40:02 +0000 Received: (at 39277) by debbugs.gnu.org; 29 Oct 2020 17:39:30 +0000 Received: from localhost ([127.0.0.1]:54869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYBta-0002aO-3M for submit@debbugs.gnu.org; Thu, 29 Oct 2020 13:39:30 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:55440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYBtY-0002a9-EI for 39277@debbugs.gnu.org; Thu, 29 Oct 2020 13:39:28 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id CF41980B07; Thu, 29 Oct 2020 13:39:22 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 94B4280792; Thu, 29 Oct 2020 13:39:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1603993161; bh=M2/9GpGGWSseYFu9xrq/mwcFq7vCw/jV0R5aY5dYyjA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YqWxIijAJ2/4/JeBl28qQAl/iTNGJMAtVauqacFPhspMDr7aYUCh1N25nVDOWRnPW I2o/9rInptvLgcDljteZTigebC3Nxu/uj2Vf0WJ3064jG0uidWYxxZbGnwqLQGGd5t XIz87ZiBRMF7hgBcNZiSZEfwy+UHm1eBOn8AuNrX0jaaKQUxzBgMwgzRQBmON8bmOC eNqzcIHyKD06ECyZDEk1m+4zs4RoiTHJQfVEi/Hie7bb3YyBe4EDz81itbAmgV42es r4FCr0C6V7zIktbaRVwc9B7pMhlKcVdLIyHAVKS4/wjiS8UcIwaE6GDv4r1w/Rork0 Kdy4BpIuO1ciQ== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5A3B5120246; Thu, 29 Oct 2020 13:39:21 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> Date: Thu, 29 Oct 2020 13:39:20 -0400 In-Reply-To: (Stefan Monnier's message of "Tue, 27 Oct 2020 18:48:56 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.059 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: 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 (---) > How 'bout the patch below? Pushed to `master`, Stefan From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Oct 2020 12:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: mvar , 39277@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.160405933613296 (code B ref 39277); Fri, 30 Oct 2020 12:03:02 +0000 Received: (at 39277) by debbugs.gnu.org; 30 Oct 2020 12:02:16 +0000 Received: from localhost ([127.0.0.1]:56462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYT6m-0003SN-Lh for submit@debbugs.gnu.org; Fri, 30 Oct 2020 08:02:16 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYT6k-0003S6-Pe for 39277@debbugs.gnu.org; Fri, 30 Oct 2020 08:02:15 -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=IBlu9GKsz+VCwZ+Lw7tik2FC5L7yGx18/6zaknVIFmA=; b=DjwJ9j7q6pzEw3i/f/SQA4FXug d3liZqBVFQG1zEcd49v5O4Vng/MZoLsGELicHdXlHH4lQciQ1AKIUW8ridnzObfNXbuud66kU/Eph U0QZ2iPb9Gs2mar1oBbbRRip/b4rtjcQqQmmCitluJ4ZOqj1Pw4nds3W96GnduTh8ReA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYT6b-0006YE-Hl; Fri, 30 Oct 2020 13:02:08 +0100 From: Lars Ingebrigtsen References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEVTZWjDu72itUv/ //8Wk9QnAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QKHgsLASPRzYUAAAFmSURBVCjPTdDBSsNAEAbg 2ZAt2FMLXQ+eRbBPEaERvG1k/qA5ebCieQoRevDmwV48VTClmad0ZpOKC9nk29mZ3QktiDgnG6Ek FHQ3AGV6nQ+41il75wErm7pn+3YDEHMX4hVsibHynqsCKYx1WMR5EQYgzDlQKFIOAhT5GJnzzJOP tBTNieVC15lEx8EDipmir388GJauATzONI+OKEI5ogeKcIx0ugdxhJb+Q4d6jYrdrQFo9Il0eiDq 0MrSMBHRa7a7aUBcuAQpLq1eghyyVJxaoUZep6JnskEO7gkp0ig+Trp9usOZ0JL69d4bJkJ51q+f EjIhWvaNJDhJDVnbYC/kWnn5yg2hJd/Its7tILQU+AIPLp3UkO5FlW2tvYa8ooyoNzHUNNX/e8WO btjXJLtvoHeciWz1mFfN3cR/KB9H7KwsT0dwswVp5D3hvkpwhtr6HCNWwNOx2g2qcMSbwz2RVvv8 BXnUrdjBIGMXAAAAQXRFWHRjb21tZW50AENSRUFUT1I6IGdkLWpwZWcgdjEuMCAodXNpbmcgSUpH IEpQRUcgdjYyKSwgcXVhbGl0eSA9IDkwCnd1XskAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMTAt MzBUMTE6MTE6MDErMDA6MDDyw4GJAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEwLTMwVDExOjEx OjAxKzAwOjAwg545NQAAAABJRU5ErkJggg== X-Now-Playing: Tracey Thorn's _Extended Plays 2010-2011_: "Swimming Charles Webster Dub" Date: Fri, 30 Oct 2020 13:02:03 +0100 In-Reply-To: (Stefan Monnier's message of "Thu, 29 Oct 2020 13:39:20 -0400") Message-ID: <875z6rly6c.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: Stefan Monnier writes: >> How 'bout the patch below? > > Pushed to `master`, Great; seems to work fine here with the test cases in this bug report. 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 (-) Stefan Monnier writes: >> How 'bout the patch below? > > Pushed to `master`, Great; seems to work fine here with the test cases in this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 08:02:32 2020 Received: (at control) by debbugs.gnu.org; 30 Oct 2020 12:02:32 +0000 Received: from localhost ([127.0.0.1]:56465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYT71-0003Sr-TD for submit@debbugs.gnu.org; Fri, 30 Oct 2020 08:02:32 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYT70-0003Sf-F5 for control@debbugs.gnu.org; Fri, 30 Oct 2020 08:02:30 -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=JtQnMO9iTW5TL++j3jfKbohp11thrBUM+4qoDd40hnw=; b=Kb3V0tB9PkOQif7nxj1rJTzAri MTYRE+g2WOYlIJTjusIfNgZxOfiykze2Bjj2EHLdfsUgwIdHxS241z88YJ4dMO3t06miOXpPTS4bE Gv9ejfCYV1ReKAHc7AFuObggEczHgiwuPMXRZHc/n9uk0h2qOO1Hha65y1ag4ddUrZoM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYT6s-0006YS-Kw for control@debbugs.gnu.org; Fri, 30 Oct 2020 13:02:24 +0100 Date: Fri, 30 Oct 2020 13:02:21 +0100 Message-Id: <874kmbly5u.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #39277 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 39277 fixed close 39277 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 39277 fixed close 39277 28.1 quit From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: mvar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2020 11:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Stefan Monnier Cc: mvar , Lars Ingebrigtsen , 39277@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-submit@debbugs.gnu.org id=B39277.160414208030000 (code B ref 39277); Sat, 31 Oct 2020 11:02:02 +0000 Received: (at 39277) by debbugs.gnu.org; 31 Oct 2020 11:01:20 +0000 Received: from localhost ([127.0.0.1]:60616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYodM-0007no-7W for submit@debbugs.gnu.org; Sat, 31 Oct 2020 07:01:20 -0400 Received: from mail-ed1-f54.google.com ([209.85.208.54]:36839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYodK-0007na-Mz for 39277@debbugs.gnu.org; Sat, 31 Oct 2020 07:01:19 -0400 Received: by mail-ed1-f54.google.com with SMTP id l16so9313730eds.3 for <39277@debbugs.gnu.org>; Sat, 31 Oct 2020 04:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=9g7qC3otpXdHWVDJhk2fu6f2V+PldoXLI5FMbxnlmrQ=; b=WUWJgxb5rX4lONHjrkY9SmZj85u9b+pQZIegJ83I0/zAHJueazMTvZ9/NdbEw+yqIv EUH5tuNFlULnihr6rb40Bp9F6y8nLIajaDZTHjU9+QsSSjB9eXtoYUn9ASYp+CUI9/mn dMA7AGfF22KYB31i94KBlBX/wu1ViheKNlRKgxWN7NNT0hPvBeotxKeEgd0+WGz87elc nHJ6mI5dIlbkuadl706+jqPayCcFPwS0cQFO0pTxvUw2wBw898a5lpsQiym5ia7N22lZ bzmK3uJfO1zVczqds4KZvhRBriD62qO60pEXcb6rJ3Me5t9qBFE5nYn7S47xb3SoA5rE zm/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=9g7qC3otpXdHWVDJhk2fu6f2V+PldoXLI5FMbxnlmrQ=; b=BQk7u93eE63PYJSGeoLbEgwYUif/1NmgyY8n5q6wfZz2RRdzjSBVp5IsDiiptb8nWT Ehc51Y2blUiqnKaTZxfd8E5UtVgvohfJH3vkw9O3ah6CnGVa7vp3H89PlJDSV6Ng8ZGy +0obPA4Hgaw1ocfr0ijWZJMB6UzgC0yUA4rO7X20wUH6PqYM6EEFU/beEmkOyylG7RMk /0/KYtpUbtKF4WhtDUuQhcPYAjL4/7OZkdirVjATNn28tdsvmU4Pug/oAAs+c9miwvUk U9MPVDRUnxmgJ67o4KTqD92btEePP6D9GwWScH00W1PJnzga2GMGkkdEAlMr/GFAjI9j 8/WA== X-Gm-Message-State: AOAM533MD/D/yQO8m4hgOUg9ZKubWh+RwFVSFrsBeUgKwRaX37BcTc4W 5vP005FqDDAvk1X8FWEJIJs= X-Google-Smtp-Source: ABdhPJwzb1+PQg9VrC95ceiGb+KH/oW+i9zEXQZrZtH7BMuBhfAR+7TnkbEg9iWEbDlqlIYCevmCGw== X-Received: by 2002:a05:6402:503:: with SMTP id m3mr7258002edv.368.1604142072766; Sat, 31 Oct 2020 04:01:12 -0700 (PDT) Received: from cnu407c2zx.nsn-intra.net ([2a02:2149:8792:af00:7dfc:2b4:ef0e:6fa3]) by smtp.gmail.com with ESMTPSA id d23sm685164eds.48.2020.10.31.04.01.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Oct 2020 04:01:12 -0700 (PDT) From: mvar X-Google-Original-From: mvar References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> Date: Sat, 31 Oct 2020 13:01:08 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 29 Oct 2020 13:39:20 -0400") Message-ID: <87y2jmr763.fsf@cnu407c2zx.nsn-intra.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 (-) Stefan Monnier writes: >> How 'bout the patch below? > > Pushed to `master`, > > > Stefan hi Stefan, apologies for late reply, i needed a couple of days to work with the patched tcl.el in my (disgustingly large) tcl codebase to be sure nothing breaks & can confirm now. The original case is solved (although the enclosed {"string} is not font-locked as string but i wouldn't consider it an error) plus it fixes the following: proc foo4 () { puts "hello}" } this was marked as valid before your changes but tclsh won't accept it as such - the bracket } inside the string needs to be escaped when inside a proc context (but as a plain statement there's no such requirement). many thanks, Michalis From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2020 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: mvar Cc: Lars Ingebrigtsen , 39277-done@debbugs.gnu.org, Hadrien Lacour Received: via spool by 39277-done@debbugs.gnu.org id=D39277.160415042218920 (code D ref 39277); Sat, 31 Oct 2020 13:21:02 +0000 Received: (at 39277-done) by debbugs.gnu.org; 31 Oct 2020 13:20:22 +0000 Received: from localhost ([127.0.0.1]:60698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYqnu-0004v6-1t for submit@debbugs.gnu.org; Sat, 31 Oct 2020 09:20:22 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYqns-0004up-CV for 39277-done@debbugs.gnu.org; Sat, 31 Oct 2020 09:20:21 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DB7CF80B13; Sat, 31 Oct 2020 09:20:14 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7BC058096B; Sat, 31 Oct 2020 09:20:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604150413; bh=uN5j8j/7AR1Jg6Bl8EYAmDw3NzGSuGlnboxleksCGSo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=iV0EfSOicbu6iAqJi4U8tJzjUWpTrbx55DNspJu1P/XHzn07v2pgI3Y7u94jKRh/I zxXZ6ELtGT4n9LLx052xk1z4aVlnpUM/AKjBEoN0HvUKQeZsYp7P3MMlimbsqdGdVT vf+UFuj8ycHYe2m4/OaFKdJSoBLfktuAjCZnqbPnZLX22K8YD/FaeDE5yMK6Ty0/Gb mlNG0IlAYZZaGPb+3Fdar+S0FDn82MGm6fPUayuOhrhyw+ktE9ZtYJ6iolWEfbsogJ EIlNdaBgu3UVf4b+zbjjE0joTJ67hmk0YG+HgxT6YiA8Sl+ERIGol7zlkuVOb43Dnc x6cmQvRFlOmPg== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4D416120468; Sat, 31 Oct 2020 09:20:13 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> <87y2jmr763.fsf@cnu407c2zx.nsn-intra.net> Date: Sat, 31 Oct 2020 09:20:12 -0400 In-Reply-To: <87y2jmr763.fsf@cnu407c2zx.nsn-intra.net> (mvar's message of "Sat, 31 Oct 2020 13:01:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.060 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: 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 (---) > apologies for late reply, No need to apologize, and it's been less than 4 days, so it's definitely not late. > I needed a couple of days to work with the patched tcl.el in my > (disgustingly large) tcl codebase to be sure nothing breaks & can > confirm now. Great, thanks! > The original case is solved > (although the enclosed {"string} is not font-locked as string but I > wouldn't consider it an error) Yes, this is a separate problem and I can't see how to fix it: since "everything's a string" in Tcl, it's really not clear what `font-lock-string-face` should apply to and what it shouldn't apply to. The current design is to use it only where "..." is used. When the code is fully under your control it lets you choose (to some extent at least) what is highlighted and what is not (by choosing "..." vs {...}), but clearly it won't be "right" in all cases. > plus it fixes the following: > > proc foo4 () { > puts "hello}" > } > > this was marked as valid before your changes but tclsh won't accept it > as such - the bracket } inside the string needs to be escaped when > inside a proc context (but as a plain statement there's no such > requirement). Indeed. Stefan From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: mvar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Nov 2020 19:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Stefan Monnier Cc: mvar , Lars Ingebrigtsen , 39277-done@debbugs.gnu.org Received: via spool by 39277-done@debbugs.gnu.org id=D39277.160443288623340 (code D ref 39277); Tue, 03 Nov 2020 19:49:02 +0000 Received: (at 39277-done) by debbugs.gnu.org; 3 Nov 2020 19:48:06 +0000 Received: from localhost ([127.0.0.1]:46505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ka2Hm-00064N-FE for submit@debbugs.gnu.org; Tue, 03 Nov 2020 14:48:06 -0500 Received: from mail-ej1-f42.google.com ([209.85.218.42]:38042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ka2Hk-00063q-3h for 39277-done@debbugs.gnu.org; Tue, 03 Nov 2020 14:48:04 -0500 Received: by mail-ej1-f42.google.com with SMTP id za3so26038426ejb.5 for <39277-done@debbugs.gnu.org>; Tue, 03 Nov 2020 11:48:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Bk+eD4kaR+0qS9l3fw2oeJi17F4IYI2O3bFIrvd5czU=; b=CKdBlhs5tjOcmZxlkfislaPLD9tc2KYGKy4HhOSrPUG0G8As994v6MMcn/Z0jfo5Vx gavfLTZ1I+IhhbFE6qmhk1Tsh+N4tUdhvjSBzuAXVzXl4GWsHUq9v2s6kg+dWEBwDFoF SzYVreyHuW5SzXAsrERF2TWyIq9gZXfZHk7npmAaRFrqL1YG5Lrk3TR4lI2QFui9JMLk HYagZxFJN2zf6W8NX96T/fqI3c0EwWbwIuq/mU+tdvzfmZyab2mCWtakAY1al2hu6IwB Tt7I3/Ol0OUHuSOy8X8DjJG5bDAhzwJb6AR8aaJxFVfpbr8mRQWRZsigh//XYJhjLDmQ hfPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Bk+eD4kaR+0qS9l3fw2oeJi17F4IYI2O3bFIrvd5czU=; b=nXK0WJQCqVK68asZtHqLEBTb4q+RD65pNlUqcf/4qo9t/EefgXIHV9Dmk8iB8BUWxU KhLjeqo42hnhfAkf8Yaap1IQ1MXFI2a3nkYrGjCectOwwVaxegGnrn8q5qna2Fz0DpFM iXk18JS89+8XDpq0H6R8BYBC4wYEQ5sgh45AKVxumApGOdLnTCCaXcxa3Bf68ZbiccEG EC33JT2E8CAUp/LN8l/Vi9qsWpo+PceY8JXCeN25rJT6HNJMV0BlaH1HSnGe+NiRik+y 0gDNpYxndP6nlcUryrtpUNNyfywe7SO8PHpkN5/bsP6+s8lIPHXEnO34sKr0BJIRy6Cc da3Q== X-Gm-Message-State: AOAM530cBEcRAKTTr6Df5lcG41irOdQTeF6CZSAQkJ1pZ6AJ2Jm6E0Db O/fdWoZHy1eZXL9tfbeUyx8V1K/zSn3sbsfu X-Google-Smtp-Source: ABdhPJzS1nFOsqSuICEXZUsLir9lDq3z60ouI3VTadXUArD7MUAq2s7jHLiLll2ZscE3ki3aPTu7Sg== X-Received: by 2002:a17:906:31c1:: with SMTP id f1mr22476120ejf.253.1604432877709; Tue, 03 Nov 2020 11:47:57 -0800 (PST) Received: from cnu407c2zx.nsn-intra.net ([2a02:2149:8883:1d00:5078:f6d:4914:61bf]) by smtp.gmail.com with ESMTPSA id d10sm8977808ejw.44.2020.11.03.11.47.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Nov 2020 11:47:57 -0800 (PST) From: mvar X-Google-Original-From: mvar References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> <87y2jmr763.fsf@cnu407c2zx.nsn-intra.net> Date: Tue, 03 Nov 2020 21:47:53 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 31 Oct 2020 09:20:12 -0400") Message-ID: <87k0v2w7bq.fsf@cnu407c2zx.nsn-intra.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 (-) Stefan Monnier writes: >> The original case is solved >> (although the enclosed {"string} is not font-locked as string but I >> wouldn't consider it an error) > > Yes, this is a separate problem and I can't see how to fix it: since > "everything's a string" in Tcl, it's really not clear what > `font-lock-string-face` should apply to and what it shouldn't apply to. > > The current design is to use it only where "..." is used. When the code > is fully under your control it lets you choose (to some extent at least) > what is highlighted and what is not (by choosing "..." vs {...}), but > clearly it won't be "right" in all cases. > >> plus it fixes the following: >> >> proc foo4 () { >> puts "hello}" >> } >> >> this was marked as valid before your changes but tclsh won't accept it >> as such - the bracket } inside the string needs to be escaped when >> inside a proc context (but as a plain statement there's no such >> requirement). > > Indeed. > hi again, i stumbled upon a not-so-rare case where this fix breaks a previously valid syntax locking. Example: set a "Testing: [split "192.168.1.1/24" "/"] address" the closing ] is marked as unmatched (no matching parenthesis found) notice how the above statement is evaluated by tclsh/wish: % set a "Testing: [split "192.168.1.1/24" "/"] address" Testing: 192.168.1.1 24 address % the problem with the unmatched ] can only(?) be solved by escaping both inner "strings" set a "Testing: [split \"192.168.1.1/24\" \"/\"] address" but then this is evaluated into an array % set a "Testing: [split \"192.168.1.1/24\" \"/\"] address" Testing: {} 192.168.1.1 24 {} address i still consider the previously applied fix as an overall improvement, so perhaps i should open a new bug report for this problem? btw i tried to come up with some fix but i'm still a looong way from grasping those syntax & parsing mechanisms (syntax-ppss and friends) thanks, Michalis From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Nov 2020 21:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: mvar Cc: Lars Ingebrigtsen , 39277-done@debbugs.gnu.org Received: via spool by 39277-done@debbugs.gnu.org id=D39277.16044399551959 (code D ref 39277); Tue, 03 Nov 2020 21:46:02 +0000 Received: (at 39277-done) by debbugs.gnu.org; 3 Nov 2020 21:45:55 +0000 Received: from localhost ([127.0.0.1]:46598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ka47n-0000VW-0u for submit@debbugs.gnu.org; Tue, 03 Nov 2020 16:45:55 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:1906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ka47l-0000VI-4K for 39277-done@debbugs.gnu.org; Tue, 03 Nov 2020 16:45:53 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6093A8115A; Tue, 3 Nov 2020 16:45:47 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7D28180241; Tue, 3 Nov 2020 16:45:45 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604439945; bh=8xsyrHN828+hLvFninFcdDhJJKbGPHl8A0rOt5naiYU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XMVVIO2uyhQxYuyvb3nEujKahQjYylyUzDl67AAjYt++kACMzJcVrrMQVsI3DY9dp OOQ09769qQ/dM1XRaFM7rsQPtIw5yOJqUJthyOMnDc4OhPKDlBXJWBK5uxLb1T499e 3sQJzKki5X5NCjzKBOInl6ryfaVAwk44U3A6FHmBrbn3Tq5GrU53enpX23LI/2l4/z TBclyrB7Ff7MnY89uEeLNKuvD+aEocc1ElH9t52QlZ5ICcrWppWPLvh8L5iuQwoCo+ 6INd/vASv7JmKfqrABD7qYUYdVB0XZraocdRy1kWZbYdIoZUg8NqHpLzfHmTONvDLp lSkx+lOuf7Fgw== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4DDD41203B2; Tue, 3 Nov 2020 16:45:45 -0500 (EST) From: Stefan Monnier Message-ID: References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> <87y2jmr763.fsf@cnu407c2zx.nsn-intra.net> <87k0v2w7bq.fsf@cnu407c2zx.nsn-intra.net> Date: Tue, 03 Nov 2020 16:45:44 -0500 In-Reply-To: <87k0v2w7bq.fsf@cnu407c2zx.nsn-intra.net> (mvar's message of "Tue, 03 Nov 2020 21:47:53 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.066 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: 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 (---) > i stumbled upon a not-so-rare case where this fix breaks a previously > valid syntax locking. Example: > > set a "Testing: [split "192.168.1.1/24" "/"] address" > > the closing ] is marked as unmatched (no matching parenthesis found) Oh, right, that's like the `...` inside "..." in sh. I had completely forgotten about it. > i still consider the previously applied fix as an overall improvement, > so perhaps i should open a new bug report for this problem? I think so, yes (but if so, please send me the bugnb). The old code handled it differently but not correctly either (in this case the breakage was less annoying, and maybe it's even the case in general, but it's largely by accident), so it's really a separate issue. Stefan From unknown Wed Aug 20 01:20:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39277: 26.3; Tcl font lock does not understand quoting Resent-From: mvar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Nov 2020 12:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39277 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Stefan Monnier Cc: mvar , Lars Ingebrigtsen , 39277-done@debbugs.gnu.org Received: via spool by 39277-done@debbugs.gnu.org id=D39277.160457991030164 (code D ref 39277); Thu, 05 Nov 2020 12:39:01 +0000 Received: (at 39277-done) by debbugs.gnu.org; 5 Nov 2020 12:38:30 +0000 Received: from localhost ([127.0.0.1]:51947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaeX8-0007qR-GC for submit@debbugs.gnu.org; Thu, 05 Nov 2020 07:38:30 -0500 Received: from mail-ed1-f51.google.com ([209.85.208.51]:34425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaeX6-0007qE-Ez for 39277-done@debbugs.gnu.org; Thu, 05 Nov 2020 07:38:29 -0500 Received: by mail-ed1-f51.google.com with SMTP id a15so1369047edy.1 for <39277-done@debbugs.gnu.org>; Thu, 05 Nov 2020 04:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=w9K9YGzD1uXv9/lxaex56C5M2aiyS5vWD25GAiPpxbs=; b=r1ZcpEUdIIs2XDYWjohU/5E+lLwcFZigJS3ne5PmLUlfJ6QUEbtDYsWKYdAWh0UJJP smTY9Q1Kzk58RmnXuhf7xJwYRTn7IlNrxTlR555wtUtOitSN3E3yd+bYwrj7n5hAHpj4 R34Ks8dVW+YkUuIOlcnvKDSt0jAVKloyaMSU9osgAjtAMR9ZcvFPGiyXyMIVYuD+wVa+ 38Z0JBicDnBnMmODlRYN5L4TGHDjpawyY65Zvgx5wZW8yEJOIPUmZFZi4qRRmDSajPng l3yIPV71aYLLekvbbmRkvcX01czvoEvWuqE3bdXh9iaxTQAHtc/W38TtyCs4DIuf5lkO 0QwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=w9K9YGzD1uXv9/lxaex56C5M2aiyS5vWD25GAiPpxbs=; b=CIFl7yFvstxdLqgYRoQtzqMsV00MOdyBsJs1tNJcFgw1g4hI7SNEP59xpJxh+l/9i4 O8HObvmyGfjX/paZuogWB+7dc9auPfoMcC9VA3rB9DqrWXqZE9W5idLJOWGsnRveOMn9 9QRC0imk7tYRVzrbZrA7O01bX/G/gXoKL6YIGPNH1g7A/02tl0O7rBhFjG1OaZpzmJUc 0yYN7EgCX8JOYiUFZev+2/FdAdmMq8XdxP0NUy+njB1duZ6oyjGkY7SDc7qEhlF8eK+o 3p14iDkHDqhRGTlF6Ak3xgux4RqbFqGG7ABhw347Jn9C9xMftYctdpCMNbZwp4nnSgaZ ODXA== X-Gm-Message-State: AOAM531S3Agxe06oprKUGiaC+xVc3Sj+mIPE/OQYc8lYqN6aXXwbEtuj fFY74xJa5rNmhzQRQzz0iSMGCvELrNP5jg== X-Google-Smtp-Source: ABdhPJytbsvVi98uRfwFgA8HW/0+nKYEl0jumdxBduhfu64cdSC8fym1wj91vS0AeFPp2GL9Ch82pA== X-Received: by 2002:a05:6402:4cb:: with SMTP id n11mr2323842edw.296.1604579902198; Thu, 05 Nov 2020 04:38:22 -0800 (PST) Received: from cnu407c2zx.nsn-intra.net ([2a02:2149:8883:1d00:fe15:b4ff:fee9:4f35]) by smtp.gmail.com with ESMTPSA id bn25sm859697ejb.76.2020.11.05.04.38.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2020 04:38:21 -0800 (PST) From: mvar X-Google-Original-From: mvar References: <20200125100009.33e3cpgmjszmpwzq@gentoo-zen2700x> <87lffs1zvw.fsf@cnu407c2zx.nsn-intra.net> <875z6v36lv.fsf@gnus.org> <87sg9ze6yj.fsf@cnu407c2zx.nsn-intra.net> <87y2jmr763.fsf@cnu407c2zx.nsn-intra.net> <87k0v2w7bq.fsf@cnu407c2zx.nsn-intra.net> Date: Thu, 05 Nov 2020 14:38:19 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 03 Nov 2020 16:45:44 -0500") Message-ID: <87v9ek5684.fsf@cnu407c2zx.nsn-intra.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 (-) Stefan Monnier writes: >> i still consider the previously applied fix as an overall improvement, >> so perhaps i should open a new bug report for this problem? > > I think so, yes (but if so, please send me the bugnb). > > The old code handled it differently but not correctly either (in this > case the breakage was less annoying, and maybe it's even the case in > general, but it's largely by accident), so it's really a separate issue. > > > Stefan thank you Stefan, i've opened #44465 br, Michalis