From unknown Wed Jun 18 23:11:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#35381 <35381@debbugs.gnu.org> To: bug#35381 <35381@debbugs.gnu.org> Subject: Status: 26.2; nxml-mode doesn't fontify attributes in single quotes Reply-To: bug#35381 <35381@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:11:04 +0000 retitle 35381 26.2; nxml-mode doesn't fontify attributes in single quotes reassign 35381 emacs submitter 35381 Noam Postavsky severity 35381 normal tag 35381 confirmed patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 22 12:09:31 2019 Received: (at submit) by debbugs.gnu.org; 22 Apr 2019 16:09:31 +0000 Received: from localhost ([127.0.0.1]:51334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIbVb-00035y-3j for submit@debbugs.gnu.org; Mon, 22 Apr 2019 12:09:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIbVZ-00035h-6K for submit@debbugs.gnu.org; Mon, 22 Apr 2019 12:09:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:43328) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hIbVR-0001Fd-I3 for submit@debbugs.gnu.org; Mon, 22 Apr 2019 12:09:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIbVP-0007FE-Kr for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 12:09:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIbVN-0001Cr-C0 for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 12:09:18 -0400 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:42585) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hIbVM-00015S-Cm for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 12:09:16 -0400 Received: by mail-qk1-x736.google.com with SMTP id c190so2937234qke.9 for ; Mon, 22 Apr 2019 09:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=iokuaADxDsx4xejC2yrTFUUWEoO5A9JnJVNfwnBNmSg=; b=sIGV8mmaJHNbFDsLK+CQVEvDYm4W9OJgLyOqngCwEOeBexuTvWeHrz0y2prBv2KjY8 x8NfOXtMU09qekG5p3Oxqkqrokc4/iGXXtLnD5b+ChfgE0iLTDelsBKspVqIFajhPk+/ Z6iQe300y7NUWxxg+s3RU0ZkJSxNhgP49YGCRg9w6dP2E6z+xshh0I/2IiZJz+zWCG56 TNRMR6mbxJHp2GwngBNB2gcn2Cr7bV188dbJFvR2ZhdZ60BrmSO07jZPtWDxjQsCI2wv K8qAfgdRXkEJpXOOd++fuDF/OOTKVMoKX+FYde54u6ujEEGJj46191BEcyc1N60VKn2Q opbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=iokuaADxDsx4xejC2yrTFUUWEoO5A9JnJVNfwnBNmSg=; b=cuVrpxrMQAV4cAC7darGSH4r/1kC1fsls5DadKMcTr2mJAzpmM8tuXfkMpWOJVbl5t Ug9QXwW01dyuR5H4UJ0RRN9kFjLZiFKwHdqxX38GW+JjMKLnMf1aGYJrM/oTK6R9Vkh9 n2JPqITwsP7ov4qtQr0UJEGCIkilTvUQswIeO4i/TA50HOM/jkeVOQxU5Tcyz8KFk0h3 9KlqBDuOIIkQpwSATF0DwdiqTLiakXx87itRJGgmVZq6kPEubww2e5mG2SOwkgBEwGNC QOdWVsfDmHRCNzze8xFu4900S6bytXaDRgLikOSSkNVtRZxKTxHl8dRANMIY2/foRI+Q XQfw== X-Gm-Message-State: APjAAAVx25gUH62St1KUOksZiyryzLp0KTARw8slpmn2akJv4yRl0yuO OQQckehm4KcAQ4bj53l2g7hxL0v1 X-Google-Smtp-Source: APXvYqwb4abhgmCVeTmYeQiWbo5gStPt6HJSJOsNuoJTuFDubonh+V6kQM2pjJ/uTOahaIX+5dmivg== X-Received: by 2002:ae9:e309:: with SMTP id v9mr3593183qkf.121.1555949337484; Mon, 22 Apr 2019 09:08:57 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id j93sm8329998qtd.82.2019.04.22.09.08.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Apr 2019 09:08:56 -0700 (PDT) From: Noam Postavsky To: bug-gnu-emacs@gnu.org Subject: 26.2; nxml-mode doesn't fontify attributes in single quotes Date: Mon, 22 Apr 2019 12:08:55 -0400 Message-ID: <87imv6rpig.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::736 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain X-Debbugs-CC: Stefan Monnier Tags: patch In an nxml-mode buffer, put the following text: Only "foo" is fontified in as a string, while bar is not. This is a regression since Emacs 25.3. The patch below seems solves problem, though I'm not entirely sure about it: there are some confusing comments in sgml-mode.el about drawbacks and tradeoffs of recognizing single quotes that I'm not really following (are they applicable to SGML only, and not XML?). There's also the difference that attribute values are now fontified with font-lock-string-face rather than nxml-attribute-value, though I'm not sure that's worth fixing. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Make-nxml-mode-recognize-single-quote-attribute-agai.patch Content-Description: Possible patch >From a3d2dbcd0c4e272802a45a7c751877b6982fb257 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 21 Apr 2019 22:44:50 -0400 Subject: [PATCH] Make nxml-mode recognize single quote attribute again * lisp/nxml/nxml-mode.el (nxml-syntax-propertize): New function. (nxml-tag-syntax-table): New constant. (nxml-mode): Set them as syntax-propertize-function and syntax-ppss-table, respectively. * test/lisp/nxml/nxml-mode-tests.el (nxml-mode-font-lock-quotes): New test. --- lisp/nxml/nxml-mode.el | 22 ++++++++++++++++++++-- test/lisp/nxml/nxml-mode-tests.el | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index ab035b927e..94fbe4b781 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -426,6 +426,24 @@ (defun nxml-parent-document-set (parent-document) (defvar tildify-space-string) (defvar tildify-foreach-region-function) +(defun nxml-syntax-propertize (start end) + "Syntactic keywords for `nxml-mode'." + (goto-char start) + (sgml-syntax-propertize-inside end) + (funcall + (syntax-propertize-rules + sgml-syntax-propertize-rules + ;; Like the " rule in `sgml-syntax-propertize-rules', but for '. + ("'" (0 (if (prog1 (zerop (car (syntax-ppss (match-beginning 0)))) + (goto-char (match-end 0))) + (string-to-syntax "."))))) + start end)) + +(defconst nxml-tag-syntax-table + (let ((table (make-syntax-table sgml-tag-syntax-table))) + (modify-syntax-entry ?\' "\"'" table)) + "Syntax table used to parse XML tags.") + ;;;###autoload (define-derived-mode nxml-mode text-mode "nXML" ;; We use C-c C-i instead of \\[nxml-balanced-close-start-tag-inline] @@ -517,8 +535,8 @@ (define-derived-mode nxml-mode text-mode "nXML" (with-silent-modifications (nxml-with-invisible-motion (nxml-scan-prolog))))) - (setq-local syntax-ppss-table sgml-tag-syntax-table) - (setq-local syntax-propertize-function #'sgml-syntax-propertize) + (setq-local syntax-ppss-table nxml-tag-syntax-table) + (setq-local syntax-propertize-function #'nxml-syntax-propertize) (add-hook 'change-major-mode-hook #'nxml-cleanup nil t) ;; Emacs 23 handles the encoding attribute on the xml declaration diff --git a/test/lisp/nxml/nxml-mode-tests.el b/test/lisp/nxml/nxml-mode-tests.el index 57a731ad18..92744be619 100644 --- a/test/lisp/nxml/nxml-mode-tests.el +++ b/test/lisp/nxml/nxml-mode-tests.el @@ -58,5 +58,25 @@ (ert-deftest nxml-balanced-close-start-tag-inline () (nxml-balanced-close-start-tag-inline) (should (equal (buffer-string) "")))) +(ert-deftest nxml-mode-font-lock-quotes () + (with-temp-buffer + (nxml-mode) + (insert "\"dquote text\"'squote text'") + (font-lock-ensure) + (let ((squote-txt-pos (search-backward "squote text")) + (dquote-txt-pos (search-backward "dquote text")) + (squote-att-pos (search-backward "squote attr")) + (dquote-att-pos (search-backward "dquote attr"))) + ;; Just make sure that each quote uses the same face for quoted + ;; attribute values, and a different face for quoted text + ;; outside tags. Don't test `font-lock-string-face' vs + ;; `nxml-attribute-value' here. + (should (equal (get-text-property squote-att-pos 'face) + (get-text-property dquote-att-pos 'face))) + (should (equal (get-text-property squote-txt-pos 'face) + (get-text-property dquote-txt-pos 'face))) + (should-not (equal (get-text-property squote-txt-pos 'face) + (get-text-property dquote-att-pos 'face)))))) + (provide 'nxml-mode-tests) ;;; nxml-mode-tests.el ends here -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 23 12:09:29 2019 Received: (at 35381) by debbugs.gnu.org; 23 Apr 2019 16:09:29 +0000 Received: from localhost ([127.0.0.1]:54180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIxz7-00035u-4o for submit@debbugs.gnu.org; Tue, 23 Apr 2019 12:09:29 -0400 Received: from alt34.smtp-out.videotron.ca ([24.53.0.23]:28856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIxz4-00035g-RL for 35381@debbugs.gnu.org; Tue, 23 Apr 2019 12:09:27 -0400 Received: from fmsmemgm.homelinux.net ([24.203.163.157]) by Videotron with SMTP id IxyxhiMnXuR9TIxyyheC9I; Tue, 23 Apr 2019 12:09:20 -0400 X-Authority-Analysis: v=2.3 cv=N+kH6V1B c=1 sm=1 tr=0 a=271BjrAMcq2W4n6OKK/JJg==:117 a=271BjrAMcq2W4n6OKK/JJg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=oexKYjalfGEA:10 a=gkaGMrA6o2bNHhjn8vIA:9 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 9A27BAE1E3; Tue, 23 Apr 2019 12:09:19 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes Message-ID: References: <87imv6rpig.fsf@gmail.com> Date: Tue, 23 Apr 2019 12:09:19 -0400 In-Reply-To: <87imv6rpig.fsf@gmail.com> (Noam Postavsky's message of "Mon, 22 Apr 2019 12:08:55 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-CMAE-Envelope: MS4wfLY285PPSJDSvxsH8GHWnCP4EUNbAuM37a2OkPgVEoAu1iVGan8dd/0Nmv45AQZoemdpRSF7O2MN5V4h3qtBwbRmXYnCHVvZed4ZooEwLN7cejTNPiUW dUNkBVpJW+5t/pWHbc1kRYj95tP8N82FFcPUhOPiS3BP6N6ApvB73GuE+/CQ01TEDH9/NJl9Q/yxHi2cCMvVseFEziT6NvRbZhmK60YgqZR5HCoxk9wOlK6R HqOTQi0q4Uxal0/qD2f2mDg8n6W3Vi0MqwFTjM7Cvm8= X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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 (/) > In an nxml-mode buffer, put the following text: > > > > Only "foo" is fontified in as a string, while bar is not. IIRC this is technically correct because IIRC in XML (contrary to SGML) only "..." is allowed and not '...'. Don't take my word for it, tho, it's just a vague recollection. This said, it's probably a good idea to understand '...' in nxml-mode, since there are various circumstances where you may want to use nxml-mode to edit files in a format that's more permissive than strict XML. > This is a regression since Emacs 25.3. Even more reason to allow '...'. Have you investigated the source of the regression? > The patch below seems solves problem, though I'm not entirely sure > about it: there are some confusing comments in sgml-mode.el about > drawbacks and tradeoffs of recognizing single quotes that I'm not > really following (are they applicable to SGML only, and not XML?). IIRC the comments aren't related to the issue of accepting '...' itself, but to some of the side-effects of doing it naively in cases such as That's right! but we're no so naive any more, so I believe that we can support this without the downsides. > There's also the difference that attribute values are now fontified with > font-lock-string-face rather than nxml-attribute-value, though I'm not > sure that's worth fixing. I don't see where else font-lock-string-face would be used in nxml-mode, so I see no need to use a special face like nxml-attribute-value for attributed values. > +(defun nxml-syntax-propertize (start end) > + "Syntactic keywords for `nxml-mode'." > + (goto-char start) > + (sgml-syntax-propertize-inside end) > + (funcall > + (syntax-propertize-rules > + sgml-syntax-propertize-rules > + ;; Like the " rule in `sgml-syntax-propertize-rules', but for '. > + ("'" (0 (if (prog1 (zerop (car (syntax-ppss (match-beginning 0)))) > + (goto-char (match-end 0))) > + (string-to-syntax "."))))) > + start end)) > + > +(defconst nxml-tag-syntax-table > + (let ((table (make-syntax-table sgml-tag-syntax-table))) > + (modify-syntax-entry ?\' "\"'" table)) > + "Syntax table used to parse XML tags.") > + > ;;;###autoload > (define-derived-mode nxml-mode text-mode "nXML" > ;; We use C-c C-i instead of \\[nxml-balanced-close-start-tag-inline] > @@ -517,8 +535,8 @@ (define-derived-mode nxml-mode text-mode "nXML" > (with-silent-modifications > (nxml-with-invisible-motion > (nxml-scan-prolog))))) > - (setq-local syntax-ppss-table sgml-tag-syntax-table) > - (setq-local syntax-propertize-function #'sgml-syntax-propertize) > + (setq-local syntax-ppss-table nxml-tag-syntax-table) > + (setq-local syntax-propertize-function #'nxml-syntax-propertize) Hmm... I think it would be better to change `sgml-syntax-propertize` so it does what we need. After all, it's more important to support '...' for SGML than for XML. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 23 21:28:21 2019 Received: (at 35381) by debbugs.gnu.org; 24 Apr 2019 01:28:21 +0000 Received: from localhost ([127.0.0.1]:54712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJ6hx-0003ya-3y for submit@debbugs.gnu.org; Tue, 23 Apr 2019 21:28:21 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:36465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJ6hu-0003yM-OV for 35381@debbugs.gnu.org; Tue, 23 Apr 2019 21:28:19 -0400 Received: by mail-qt1-f193.google.com with SMTP id c35so3732037qtk.3 for <35381@debbugs.gnu.org>; Tue, 23 Apr 2019 18:28: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=r3BcLT8Mm1yXNXNU3keD+FBZMtKK9Wl4tT1UBKaIWHo=; b=Pwr1NNxyzi/tf1S+iGwhiY5lT0SAh0+bEwNi/cNmsEWGNCEmAMLHW3aoQk4NG8e9/6 jEgMK5Ct29O2iyFJLIXrsvKCaBOzX8RlyJTyQUA4rTggTtlDem2YSVQe/+HQrHZ+Duvf W2cwShAu09BRNT6VjnVW8Y/NVH1BvEZj2R5B58AZDINFUkrqZracipLCU0g5gsAam2oa uR9zlaK2qYnjXz9EWiHqGjuxmu9BuNB4tG2oVfyHHfCkRjopFc4b0sIiMOBFa+Z0nG9j OlRBq4Yir3NGL4ytuAc1kSSr/RRgA2n4p7veuK7dzLbfhtlKiGGIwHX5aIyQwqofxL4V sFPQ== 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=r3BcLT8Mm1yXNXNU3keD+FBZMtKK9Wl4tT1UBKaIWHo=; b=KZilUCPBIoOEVH5Un+evhyH2YGppqRP6WGBIaauheS2wC9WXIppTYtV26kWkkavYgN csYHNxG3e4JbrSAGctD0I9pU0Sq1wI+XTCz6NzVq25FmPxzbgfiyNiBH3on2pQ1C/Mon KCJ/wgHMCNC4hQ9X5gbCMuHjriMp3Pn29EQ3fE62u2+ZDMROg07f1JgNhcmklfVwkO7u LgUU2oeZgWMeznqz4lca6vfdGqztV18JbtOImuJN1zGcNfE0ymoNFFl0yMkPafJ5RGso gFnz/XfRYfGbGs9+dmRinL2ViahZPbiEm0x+LLTxK9SINh31yGYJS9+hERNGBGpJYFEz 3eeQ== X-Gm-Message-State: APjAAAVqeNfzQs0BD/xOx/CEO6ryr/O3cNn6a8Zv+6hnHhkMm2wFUM3x AGZHS/YPYMNDSO5IMhdL0t0QCK9b X-Google-Smtp-Source: APXvYqwC6QVxq2wJLrTiiaY82JA265oCA7aQzsV4YbBLxYdmbUztZGfdqtuGioqayT89Q4P0IXVwEA== X-Received: by 2002:a0c:d603:: with SMTP id c3mr14238447qvj.144.1556069292996; Tue, 23 Apr 2019 18:28:12 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id y14sm9008381qth.48.2019.04.23.18.28.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Apr 2019 18:28:11 -0700 (PDT) From: Noam Postavsky To: Stefan Monnier Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes References: <87imv6rpig.fsf@gmail.com> Date: Tue, 23 Apr 2019 21:28:10 -0400 In-Reply-To: (Stefan Monnier's message of "Tue, 23 Apr 2019 12:09:19 -0400") Message-ID: <87v9z4qjit.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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 Stefan Monnier writes: >> In an nxml-mode buffer, put the following text: >> >> >> >> Only "foo" is fontified in as a string, while bar is not. > > IIRC this is technically correct because IIRC in XML (contrary to SGML) > only "..." is allowed and not '...'. Don't take my word for it, tho, > it's just a vague recollection. Well, I was pretty sure that XML allows both quotes, but just to make things definitive, https://www.w3.org/TR/xml/#NT-AttValue: [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" I found this for SGML http://xml.coverpages.org/sgmlsyn/sgmlsyn.htm#P34: [34] attribute value literal = ( lit , " replaceable character data [46] *, lit ) | " ( lita , ' replaceable character data [46] *, lita ) ' > This said, it's probably a good idea to understand '...' in nxml-mode, > since there are various circumstances where you may want to use > nxml-mode to edit files in a format that's more permissive than strict XML. > >> This is a regression since Emacs 25.3. > > Even more reason to allow '...'. > Have you investigated the source of the regression? I didn't actually checkout and compile before+after, but I'm pretty sure it's [56e1097584], same as Bug#32003. [56e1097584]: 2016-01-16 15:03:42 -0500 lisp/nxml: Use syntax-tables for comments https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=56e1097584c13f2b6db85592769db1c6c36e9419 >> The patch below seems solves problem, though I'm not entirely sure >> about it: there are some confusing comments in sgml-mode.el about >> drawbacks and tradeoffs of recognizing single quotes that I'm not >> really following (are they applicable to SGML only, and not XML?). > > IIRC the comments aren't related to the issue of accepting '...' itself, > but to some of the side-effects of doing it naively in cases such as > > That's right! > > but we're no so naive any more, so I believe that we can support this > without the downsides. >> + (setq-local syntax-ppss-table nxml-tag-syntax-table) >> + (setq-local syntax-propertize-function #'nxml-syntax-propertize) > > Hmm... I think it would be better to change `sgml-syntax-propertize` so > it does what we need. After all, it's more important to support '...' > for SGML than for XML. s/more/equally/, but otherwise yes. Patching sgml-mode is shorter and even fixes Bug#8203 as well. Still good for emacs-26 I hope, since this is for an (nxml-mode) regression in 26.1. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Recognize-single-quote-attribute-values-in-nxml-and-.patch Content-Description: patch >From 4288bf689b9dcdf32c7074d54e76c34ff115dea9 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 21 Apr 2019 22:44:50 -0400 Subject: [PATCH] Recognize single quote attribute values in nxml and sgml (Bug#35381) * lisp/textmodes/sgml-mode.el (sgml-specials): Add single quote. (sgml-syntax-propertize-rules): Handle single quote. * test/lisp/nxml/nxml-mode-tests.el (nxml-mode-font-lock-quotes): New test. * test/lisp/textmodes/sgml-mode-tests.el (sgml-delete-tag-bug-8203-should-not-delete-apostrophe): Now passes. --- lisp/textmodes/sgml-mode.el | 10 +++++----- test/lisp/nxml/nxml-mode-tests.el | 20 ++++++++++++++++++++ test/lisp/textmodes/sgml-mode-tests.el | 1 - 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 50b2077ef4..0eaad1a1ed 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -103,7 +103,7 @@ (defcustom sgml-mode-hook nil ;; As long as Emacs's syntax can't be complemented with predicates to context ;; sensitively confirm the syntax of characters, we have to live with this ;; kludgy kind of tradeoff. -(defvar sgml-specials '(?\") +(defvar sgml-specials '(?\" ?\') "List of characters that have a special meaning for SGML mode. This list is used when first loading the `sgml-mode' library. The supported characters and potential disadvantages are: @@ -351,12 +351,12 @@ (eval-and-compile ("--[ \t\n]*\\(>\\)" (1 "> b")) ("\\(<\\)[?!]" (1 (prog1 "|>" (sgml-syntax-propertize-inside end)))) - ;; Double quotes outside of tags should not introduce strings. + ;; Quotes outside of tags should not introduce strings. ;; Be careful to call `syntax-ppss' on a position before the one we're ;; going to change, so as not to need to flush the data we just computed. - ("\"" (0 (if (prog1 (zerop (car (syntax-ppss (match-beginning 0)))) - (goto-char (match-end 0))) - (string-to-syntax "."))))))) + ("[\"']" (0 (if (prog1 (zerop (car (syntax-ppss (match-beginning 0)))) + (goto-char (match-end 0))) + (string-to-syntax "."))))))) (defun sgml-syntax-propertize (start end) "Syntactic keywords for `sgml-mode'." diff --git a/test/lisp/nxml/nxml-mode-tests.el b/test/lisp/nxml/nxml-mode-tests.el index 57a731ad18..92744be619 100644 --- a/test/lisp/nxml/nxml-mode-tests.el +++ b/test/lisp/nxml/nxml-mode-tests.el @@ -58,5 +58,25 @@ (ert-deftest nxml-balanced-close-start-tag-inline () (nxml-balanced-close-start-tag-inline) (should (equal (buffer-string) "")))) +(ert-deftest nxml-mode-font-lock-quotes () + (with-temp-buffer + (nxml-mode) + (insert "\"dquote text\"'squote text'") + (font-lock-ensure) + (let ((squote-txt-pos (search-backward "squote text")) + (dquote-txt-pos (search-backward "dquote text")) + (squote-att-pos (search-backward "squote attr")) + (dquote-att-pos (search-backward "dquote attr"))) + ;; Just make sure that each quote uses the same face for quoted + ;; attribute values, and a different face for quoted text + ;; outside tags. Don't test `font-lock-string-face' vs + ;; `nxml-attribute-value' here. + (should (equal (get-text-property squote-att-pos 'face) + (get-text-property dquote-att-pos 'face))) + (should (equal (get-text-property squote-txt-pos 'face) + (get-text-property dquote-txt-pos 'face))) + (should-not (equal (get-text-property squote-txt-pos 'face) + (get-text-property dquote-att-pos 'face)))))) + (provide 'nxml-mode-tests) ;;; nxml-mode-tests.el ends here diff --git a/test/lisp/textmodes/sgml-mode-tests.el b/test/lisp/textmodes/sgml-mode-tests.el index 20b5e27ff5..7318a667b3 100644 --- a/test/lisp/textmodes/sgml-mode-tests.el +++ b/test/lisp/textmodes/sgml-mode-tests.el @@ -125,7 +125,6 @@ (ert-deftest sgml-delete-tag-should-signal-error-when-deleting-too-much () (should (string= content (buffer-string)))))) (ert-deftest sgml-delete-tag-bug-8203-should-not-delete-apostrophe () - :expected-result :failed (sgml-with-content "Winter is comin'" (sgml-delete-tag 1) -- 2.11.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 24 10:52:05 2019 Received: (at 35381) by debbugs.gnu.org; 24 Apr 2019 14:52:05 +0000 Received: from localhost ([127.0.0.1]:56172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJJFk-0004Ha-Uq for submit@debbugs.gnu.org; Wed, 24 Apr 2019 10:52:05 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:57424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJJFj-0004HS-4M for 35381@debbugs.gnu.org; Wed, 24 Apr 2019 10:52:03 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x3OEq1aY026823; Wed, 24 Apr 2019 10:52:01 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1CBE26AE07; Wed, 24 Apr 2019 10:52:01 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes Message-ID: References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> Date: Wed, 24 Apr 2019 10:52:01 -0400 In-Reply-To: <87v9z4qjit.fsf@gmail.com> (Noam Postavsky's message of "Tue, 23 Apr 2019 21:28:10 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6532=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6532> : inlines <7059> : streams <1819598> : uri <2836531> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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 (---) > Well, I was pretty sure that XML allows both quotes, but just to make > things definitive, https://www.w3.org/TR/xml/#NT-AttValue: > > [10] AttValue ::= '"' ([^<&"] | Reference)* '"' > | "'" ([^<&'] | Reference)* "'" Thanks for checking. > I didn't actually checkout and compile before+after, but I'm pretty sure > it's [56e1097584], same as Bug#32003. > > [56e1097584]: 2016-01-16 15:03:42 -0500 > lisp/nxml: Use syntax-tables for comments > https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=56e1097584c13f2b6db85592769db1c6c36e9419 Ah, yes, that makes sense. > s/more/equally/, but otherwise yes. Patching sgml-mode is shorter and > even fixes Bug#8203 as well. Still good for emacs-26 I hope, since this > is for an (nxml-mode) regression in 26.1. Great, thanks. > --- a/lisp/textmodes/sgml-mode.el > +++ b/lisp/textmodes/sgml-mode.el > @@ -103,7 +103,7 @@ (defcustom sgml-mode-hook nil > ;; As long as Emacs's syntax can't be complemented with predicates to context > ;; sensitively confirm the syntax of characters, we have to live with this > ;; kludgy kind of tradeoff. > -(defvar sgml-specials '(?\") > +(defvar sgml-specials '(?\" ?\') > "List of characters that have a special meaning for SGML mode. > This list is used when first loading the `sgml-mode' library. > The supported characters and potential disadvantages are: I think this "disadvantages" part of the docstring is out of date. Can you update it while you're at it? Also, we probably want to mark this var as obsolete. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 24 22:25:07 2019 Received: (at 35381) by debbugs.gnu.org; 25 Apr 2019 02:25:07 +0000 Received: from localhost ([127.0.0.1]:57011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJU4Q-0001zu-Vy for submit@debbugs.gnu.org; Wed, 24 Apr 2019 22:25:07 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:38735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJU4P-0001zG-CY for 35381@debbugs.gnu.org; Wed, 24 Apr 2019 22:25:05 -0400 Received: by mail-qt1-f178.google.com with SMTP id d13so22771716qth.5 for <35381@debbugs.gnu.org>; Wed, 24 Apr 2019 19:25:05 -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=EVtTIvYbzIEcl6O5Wm1aTOXu+dgQit0XCLH9Uqr8qFg=; b=T65rrt8rbzUbmcLqX4Um1x3xdWJXXhrvES229mx86FHGKUYN32TfemEEIanD/zTNuK cGCYrpixVxuaE7VT6Hcin803omukrI+zIrBA+oJpYbHr04T8PT9j7KCZyHDEiPmLqWfo hWOyqi3i4t/ZbEtO+qmrUL1EqGjfmiMjZsOxtEuzK94hnSaWNuiIu57FAqIIfvQMsRag lxX0EXVA//mvVj22cPOwb4S7JfElBSLcJQKPNCeO7S2zQ95DYPVdo/1GGeA23sOzXDtd 4eGz1sspviBM+L2wOjaQ5PinPx+zpT3W8w4bPo+rPW3NZPILYPUtMWnlAKJvXMT3h9FD jWdw== 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=EVtTIvYbzIEcl6O5Wm1aTOXu+dgQit0XCLH9Uqr8qFg=; b=Ta1S+IObH695SU551KSR1haaxMBZKwQDF0KSVl0xLbqu0Wo5mSLOUXmbwLWtGlZDbC aKVNWJ8uKKNh2WaWXFWmHw3FpsRdTKU6F1W7WWBTH1f7tXMCpSMZFohx1prtqnjbSiOX G/W4ay9ZYeWXIUhWJrDVx5q85tJy2jtZZ3o/xt6UnpBRK6Adiwrv6kfLlUFyH+XHHm8I aWVcSRiJntmXI1UFirbb7b0kWmwtjGZ/vJbU/S2ujAJXbMIPbBaYO0zZE7yMCHPHAK+R N+XIuPpVLce+UL0NTQX3JIRNkoHKXYBo/hmOsHk5lWCj6I04zvw1BPzG87uXw9eTT1Uy Cz5Q== X-Gm-Message-State: APjAAAVR+xDDxolU8qEJHKp+EU6d2fVqqklwU+HE8SM8OeZh6pmBdoCX 20PQIP7h6Byl6iqrYeuFS9f39Llm X-Google-Smtp-Source: APXvYqz8sPa/Es1DxgaVNGsaQOqrQEknMaP43B93s9u1i9ZX9WYj1V/qC9MMq0MUJw4SR79brzeDkA== X-Received: by 2002:ac8:3773:: with SMTP id p48mr18260130qtb.381.1556159099626; Wed, 24 Apr 2019 19:24:59 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e4sm10953071qtb.61.2019.04.24.19.24.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2019 19:24:59 -0700 (PDT) From: Noam Postavsky To: Stefan Monnier Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> Date: Wed, 24 Apr 2019 22:24:57 -0400 In-Reply-To: (Stefan Monnier's message of "Wed, 24 Apr 2019 10:52:01 -0400") Message-ID: <87mukerfd2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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: >> +(defvar sgml-specials '(?\" ?\') >> "List of characters that have a special meaning for SGML mode. >> This list is used when first loading the `sgml-mode' library. >> The supported characters and potential disadvantages are: > > I think this "disadvantages" part of the docstring is out of date. > Can you update it while you're at it? > > Also, we probably want to mark this var as obsolete. I'm not sure about this, is the disadvantage of the ?- also out of date? There's some FIXME on the "--" rule of sgml-syntax-propertize-rules, -;; As long as Emacs's syntax can't be complemented with predicates to context -;; sensitively confirm the syntax of characters, we have to live with this -;; kludgy kind of tradeoff. (defvar sgml-specials '(?\" ?\') "List of characters that have a special meaning for SGML mode. This list is used when first loading the `sgml-mode' library. -The supported characters and potential disadvantages are: - - ?\\\" Makes \" in text start a string. - ?\\=' Makes \\=' in text start a string. - ?- Makes -- in text start a comment. - -When only one of ?\\\" or ?\\=' are included, \"\\='\" or \\='\"\\=', as can be found in -DTDs, start a string. To partially avoid this problem this also makes these -self insert as named entities depending on `sgml-quick-keys'. +The supported characters are ?\\\", ?\\=', and ?-. Including ?- has the problem of affecting dashes that have nothing to do with comments, so we normally turn it off.") From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 25 08:47:11 2019 Received: (at 35381) by debbugs.gnu.org; 25 Apr 2019 12:47:11 +0000 Received: from localhost ([127.0.0.1]:57700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJdmR-00026d-97 for submit@debbugs.gnu.org; Thu, 25 Apr 2019 08:47:11 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:51244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJdmP-00026V-BS for 35381@debbugs.gnu.org; Thu, 25 Apr 2019 08:47:10 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x3PCl78L029091; Thu, 25 Apr 2019 08:47:08 -0400 Received: by pastel.home (Postfix, from userid 20848) id CC6B66AE07; Thu, 25 Apr 2019 08:47:07 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes Message-ID: References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> Date: Thu, 25 Apr 2019 08:47:07 -0400 In-Reply-To: <87mukerfd2.fsf@gmail.com> (Noam Postavsky's message of "Wed, 24 Apr 2019 22:24:57 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6533=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6533> : inlines <7059> : streams <1819685> : uri <2836898> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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'm not sure about this, is the disadvantage of the ?- also out > of date? If not, we should just fix it with appropriate syntax-propertize tricks. > Including ?- has the problem of affecting dashes that have nothing to do > with comments, so we normally turn it off.") Actually, I think the issue with -- comments is not just that they should not be treated as such when appearing outside tags, but that even within tags it's often not to be considered as comments. E.g. according to my flaky memory --...-- is not considered as a comment in HTML nor in XML (both inside and outside of tags). Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 07:32:28 2019 Received: (at 35381) by debbugs.gnu.org; 26 Apr 2019 11:32:28 +0000 Received: from localhost ([127.0.0.1]:60219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJz5f-0007bv-Id for submit@debbugs.gnu.org; Fri, 26 Apr 2019 07:32:27 -0400 Received: from mail-qt1-f179.google.com ([209.85.160.179]:44802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJz5e-0007XX-AP for 35381@debbugs.gnu.org; Fri, 26 Apr 2019 07:32:26 -0400 Received: by mail-qt1-f179.google.com with SMTP id s10so3593029qtc.11 for <35381@debbugs.gnu.org>; Fri, 26 Apr 2019 04:32:26 -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=4d0kGDd8+o6XYCSxrvGG8n1IW5FRY7B7a10RK1FbWEk=; b=rJYi3aC+CweklJCFRjlZafZae0diG0xtU95WqAxyuKo1MFeM5ZuGZ0BgLe8IbP7qDg TWqrPuqEAdEoqM1u6tCl+tgkCFXbI21lNddAOg9yzRFHpXdAu4A/ZtDnOMl8tt6pu4z3 5sXUnDyY/aqIR9Fo4Q2gr6rrBhDuEDbSroQpyJW9xEZUX+diZpyEiWOdyCI9ObUEGyIJ 7HVu7S35s5IewjowdTfDki0vj80TAKFldodLjZd73tOcdoq016JO+kBDmCz5MbCmlcoG fi32KxnuPsWq84BRMYt+WKk+ZQFnA29GsBK+/6lmEX5Ss/jCLbGaKzXTsp+kSgmRv/HM zcyg== 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=4d0kGDd8+o6XYCSxrvGG8n1IW5FRY7B7a10RK1FbWEk=; b=nyl+r2M4nruPbuNWZA7RX1rxMRHNe8ErdePjQki7wq6AUrtFd0LjnYxtynvhy4uOgE V0MXKuhDnanyWHZmITNMzlpmZ9I95osGkH3oFnqSW8livlv2eM0NFczwI2JVNDthjM8C 6MplpPxL2deE8EjFpkzfOYMhyXHjpIwE9BOy4JNzSYZjl9ippRtCVFdHzbJEQBt/sFc5 po8ulpIb8dxu39Ig4DUtK1MOLj6KIek6II1Rht+UrWf8Tnk+i9dzqKYEfSZPQzJ4uFEe x+PuGqm23V+LOeJ51eemSdpCANPKGOUB4aXZK+DSwfV9F36uSG70JbHekhSYmDErz12r 0Bgw== X-Gm-Message-State: APjAAAUd2UBIhL1D4U4G7vfGTjy7G+mLT7rI5cul8/yfkpOv6OpETkZy OH4nPCMWDdQKuXUVdU59HtlSVSFr X-Google-Smtp-Source: APXvYqwfBWfvg4Xn697jPQrB+lk1fK5L95B5wdwS3eNyeWRu5vFYC0l5GKxZkl0YoqZmn27CJP5ZWQ== X-Received: by 2002:a0c:d97a:: with SMTP id t55mr155242qvj.182.1556278339545; Fri, 26 Apr 2019 04:32:19 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id o23sm3117459qtr.75.2019.04.26.04.32.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2019 04:32:18 -0700 (PDT) From: Noam Postavsky To: Stefan Monnier Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> Date: Fri, 26 Apr 2019 07:32:17 -0400 In-Reply-To: (Stefan Monnier's message of "Thu, 25 Apr 2019 08:47:07 -0400") Message-ID: <87ftq5q9xa.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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'm not sure about this, is the disadvantage of the ?- also out >> of date? > > If not, we should just fix it with appropriate syntax-propertize tricks. > >> Including ?- has the problem of affecting dashes that have nothing to do >> with comments, so we normally turn it off.") > > Actually, I think the issue with -- comments is not just that they > should not be treated as such when appearing outside tags, but that even > within tags it's often not to be considered as comments. > > E.g. according to my flaky memory --...-- is not considered as a comment > in HTML nor in XML (both inside and outside of tags). XML says comments should always be where ... contains no "--". https://www.w3.org/TR/xml/#sec-comments For SGML, it seems that --...-- is a comment within DTD definitions. Otherwise only just like XML. It's all rather confusing. http://www.flightlab.com/~joe/sgml/comments.html https://www.w3.org/TR/WD-html40-970917/intro/sgmltut.html -;; As long as Emacs's syntax can't be complemented with predicates to context -;; sensitively confirm the syntax of characters, we have to live with this -;; kludgy kind of tradeoff. +;; TODO: Add syntax-propertize rules to handle "--" properly, and +;; eventually get rid of this variable altogether. (defvar sgml-specials '(?\" ?\') "List of characters that have a special meaning for SGML mode. This list is used when first loading the `sgml-mode' library. -The supported characters and potential disadvantages are: +The supported characters are ?\\\", ?\\=', and ?-. - ?\\\" Makes \" in text start a string. - ?\\=' Makes \\=' in text start a string. - ?- Makes -- in text start a comment. - -When only one of ?\\\" or ?\\=' are included, \"\\='\" or \\='\"\\=', as can be found in -DTDs, start a string. To partially avoid this problem this also makes these -self insert as named entities depending on `sgml-quick-keys'. - -Including ?- has the problem of affecting dashes that have nothing to do -with comments, so we normally turn it off.") +Including ?- makes double dashes into comment delimiters, but +they are really only supposed to delimit comments within DTD +definitions. So we normally turn it off.") From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 29 17:23:44 2019 Received: (at 35381) by debbugs.gnu.org; 29 Apr 2019 21:23:45 +0000 Received: from localhost ([127.0.0.1]:39980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLDkW-0002J7-Mo for submit@debbugs.gnu.org; Mon, 29 Apr 2019 17:23:44 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:56623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLDkT-0002Ix-NU for 35381@debbugs.gnu.org; Mon, 29 Apr 2019 17:23:42 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x3TLNeEu012483; Mon, 29 Apr 2019 17:23:40 -0400 Received: by pastel.home (Postfix, from userid 20848) id 329786AD2C; Mon, 29 Apr 2019 17:23:40 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes Message-ID: References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> <87ftq5q9xa.fsf@gmail.com> Date: Mon, 29 Apr 2019 17:23:40 -0400 In-Reply-To: <87ftq5q9xa.fsf@gmail.com> (Noam Postavsky's message of "Fri, 26 Apr 2019 07:32:17 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6535=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6535> : inlines <7062> : streams <1820102> : uri <2838625> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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 (---) > XML says comments should always be where ... contains no > "--". That's also what I remember. > For SGML, it seems that --...-- is a comment within DTD definitions. But only within the DTD definition, so in practice I think it means it's not a comment in SGML files. > Otherwise only just like XML. It's all rather confusing. Confusing is a pretty good description. From where I stand, I think we simply shouldn't bother to try and handle "--" specially. At least not before someone comes with a concrete use-case. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat May 04 23:52:26 2019 Received: (at 35381) by debbugs.gnu.org; 5 May 2019 03:52:26 +0000 Received: from localhost ([127.0.0.1]:52778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hN8CQ-0006PQ-6A for submit@debbugs.gnu.org; Sat, 04 May 2019 23:52:26 -0400 Received: from mail-qk1-f179.google.com ([209.85.222.179]:40270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hN8CO-0006PC-2x for 35381@debbugs.gnu.org; Sat, 04 May 2019 23:52:24 -0400 Received: by mail-qk1-f179.google.com with SMTP id w20so7936qka.7 for <35381@debbugs.gnu.org>; Sat, 04 May 2019 20:52:23 -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=sG3KL24c3aETqiyiRccix5Dtn4zZckH85xhWrGE/B5c=; b=ff3ojSdZypLqSS5W5FsE5DnADvMutYlBBJs0IdpcpeagCtsLH+zMbMnyT30kjyL+FD i6fJhe11ODyvnnf3Rti9qa8SwhE39zVzKC1yUDON3eCr4U2/J/VzhcIdK7BDYINalVMI flECE7S3qN2fAmTI8tNms3yi29+jwFEOo/fy8ysVPbV2Ro/UqUgaVNiOHG3usQDVDiNh ISbL21FzjMVcThLwzEloQ/i0J4d34bjGs5O3vpwm73vYL8B7xoazwOcY5UyXkEwoVQz2 LBHwvN3/xZEEbv8Vr8hQCYYLVTUQEUwXY1Pl5D7fVDgHWeHAjBhehvD+MNYiCbS68ozZ WTbA== 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=sG3KL24c3aETqiyiRccix5Dtn4zZckH85xhWrGE/B5c=; b=moKEKfo92VZ7G0js57Di+U1jdWx0O1zSPfgXW9SNt/U5dEYxrGSQWFDU2+N0SeUAjh jDsgQEmS6pJFLcWiqp7MGZ3sVSKFJA8RGwxdLlx8mqnVR8K6jxi5FbFyc65FNX3PlGSn sg6YggDp6ZmgJ8tFCfgENTzoUbAIGHgert/Q8XPv/jHiaCFuTaYeNHM1tatfzo5hLAOg YLh1QXVBfS5VX++/5Wj/iombbqHgaWK9Y4rEYWwUsOGfJYBtKoZnVJW8MM3rp7LdkMfj BDOCK6tJcc9iIUPUWsN72ElgJKEx5xMXHCMhrHYGuFNA54Ao+qLxnzgAy8MsGpOApZdZ oPSQ== X-Gm-Message-State: APjAAAWaPI0Pcu4zphGEi9XUmTcohno3/4cbJHXeXUonmTKNjnGlKpC1 SuCUwUuDSEH7jGp3NtrdLxmJphGj X-Google-Smtp-Source: APXvYqyAszVdi3nZHmMPXc91plH6+TOfL9sFBcGkQf7GN6llywjxeoPLgcV/hKvbn2QoPbm1rscs5Q== X-Received: by 2002:a37:6984:: with SMTP id e126mr14969705qkc.67.1557028338193; Sat, 04 May 2019 20:52:18 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id k65sm4583090qkc.79.2019.05.04.20.52.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 May 2019 20:52:17 -0700 (PDT) From: Noam Postavsky To: Stefan Monnier Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> <87ftq5q9xa.fsf@gmail.com> Date: Sat, 04 May 2019 23:52:16 -0400 In-Reply-To: (Stefan Monnier's message of "Mon, 29 Apr 2019 17:23:40 -0400") Message-ID: <87pnoxmubz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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 Stefan Monnier writes: > From where I stand, I think we simply shouldn't bother to try and > handle "--" specially. At least not before someone comes with a > concrete use-case. Agreed (I updated the commentary a bit to say that). --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-Recognize-single-quote-attribute-values-in-nxml-and-.patch Content-Description: patch >From 6985354ef612cf0e2db1987e51e5a9f06b396ad9 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 21 Apr 2019 22:44:50 -0400 Subject: [PATCH] Recognize single quote attribute values in nxml and sgml (Bug#35381) * lisp/textmodes/sgml-mode.el (sgml-specials): Add single quote. (sgml-syntax-propertize-rules): Handle single quote. * test/lisp/nxml/nxml-mode-tests.el (nxml-mode-font-lock-quotes): New test. * test/lisp/textmodes/sgml-mode-tests.el (sgml-delete-tag-bug-8203-should-not-delete-apostrophe): Now passes. --- lisp/textmodes/sgml-mode.el | 34 +++++++++++++++------------------- test/lisp/nxml/nxml-mode-tests.el | 20 ++++++++++++++++++++ test/lisp/textmodes/sgml-mode-tests.el | 1 - 3 files changed, 35 insertions(+), 20 deletions(-) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 50b2077ef4..128e58810e 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -100,24 +100,20 @@ (defcustom sgml-mode-hook nil :group 'sgml :type 'hook) -;; As long as Emacs's syntax can't be complemented with predicates to context -;; sensitively confirm the syntax of characters, we have to live with this -;; kludgy kind of tradeoff. -(defvar sgml-specials '(?\") +;; The official handling of "--" is complicated in SGML, and +;; historically not well supported by browser HTML parsers. +;; Recommendations for writing HTML comments is to use +;; (where ... doesn't contain "--") to avoid the complications +;; altogether (XML goes even further by requiring this in the spec). +;; So there is probably no need to handle it "correctly". +(defvar sgml-specials '(?\" ?\') "List of characters that have a special meaning for SGML mode. This list is used when first loading the `sgml-mode' library. -The supported characters and potential disadvantages are: +The supported characters are ?\\\", ?\\=', and ?-. - ?\\\" Makes \" in text start a string. - ?\\=' Makes \\=' in text start a string. - ?- Makes -- in text start a comment. - -When only one of ?\\\" or ?\\=' are included, \"\\='\" or \\='\"\\=', as can be found in -DTDs, start a string. To partially avoid this problem this also makes these -self insert as named entities depending on `sgml-quick-keys'. - -Including ?- has the problem of affecting dashes that have nothing to do -with comments, so we normally turn it off.") +Including ?- makes double dashes into comment delimiters, but +they are really only supposed to delimit comments within DTD +definitions. So we normally turn it off.") (defvar sgml-quick-keys nil "Use <, >, &, /, SPC and `sgml-specials' keys \"electrically\" when non-nil. @@ -351,12 +347,12 @@ (eval-and-compile ("--[ \t\n]*\\(>\\)" (1 "> b")) ("\\(<\\)[?!]" (1 (prog1 "|>" (sgml-syntax-propertize-inside end)))) - ;; Double quotes outside of tags should not introduce strings. + ;; Quotes outside of tags should not introduce strings. ;; Be careful to call `syntax-ppss' on a position before the one we're ;; going to change, so as not to need to flush the data we just computed. - ("\"" (0 (if (prog1 (zerop (car (syntax-ppss (match-beginning 0)))) - (goto-char (match-end 0))) - (string-to-syntax "."))))))) + ("[\"']" (0 (if (prog1 (zerop (car (syntax-ppss (match-beginning 0)))) + (goto-char (match-end 0))) + (string-to-syntax "."))))))) (defun sgml-syntax-propertize (start end) "Syntactic keywords for `sgml-mode'." diff --git a/test/lisp/nxml/nxml-mode-tests.el b/test/lisp/nxml/nxml-mode-tests.el index 57a731ad18..92744be619 100644 --- a/test/lisp/nxml/nxml-mode-tests.el +++ b/test/lisp/nxml/nxml-mode-tests.el @@ -58,5 +58,25 @@ (ert-deftest nxml-balanced-close-start-tag-inline () (nxml-balanced-close-start-tag-inline) (should (equal (buffer-string) "")))) +(ert-deftest nxml-mode-font-lock-quotes () + (with-temp-buffer + (nxml-mode) + (insert "\"dquote text\"'squote text'") + (font-lock-ensure) + (let ((squote-txt-pos (search-backward "squote text")) + (dquote-txt-pos (search-backward "dquote text")) + (squote-att-pos (search-backward "squote attr")) + (dquote-att-pos (search-backward "dquote attr"))) + ;; Just make sure that each quote uses the same face for quoted + ;; attribute values, and a different face for quoted text + ;; outside tags. Don't test `font-lock-string-face' vs + ;; `nxml-attribute-value' here. + (should (equal (get-text-property squote-att-pos 'face) + (get-text-property dquote-att-pos 'face))) + (should (equal (get-text-property squote-txt-pos 'face) + (get-text-property dquote-txt-pos 'face))) + (should-not (equal (get-text-property squote-txt-pos 'face) + (get-text-property dquote-att-pos 'face)))))) + (provide 'nxml-mode-tests) ;;; nxml-mode-tests.el ends here diff --git a/test/lisp/textmodes/sgml-mode-tests.el b/test/lisp/textmodes/sgml-mode-tests.el index 20b5e27ff5..7318a667b3 100644 --- a/test/lisp/textmodes/sgml-mode-tests.el +++ b/test/lisp/textmodes/sgml-mode-tests.el @@ -125,7 +125,6 @@ (ert-deftest sgml-delete-tag-should-signal-error-when-deleting-too-much () (should (string= content (buffer-string)))))) (ert-deftest sgml-delete-tag-bug-8203-should-not-delete-apostrophe () - :expected-result :failed (sgml-with-content "Winter is comin'" (sgml-delete-tag 1) -- 2.11.0 --=-=-= Content-Type: text/plain I think that plus the patches for #32003 and #32897 should cover the nxml fixes I'm planning for emacs-26. I'll wait for another few days and then push. https://debbugs.gnu.org/cgi/bugreport.cgi?filename=0001-Fix-nxml-get-inside-Bug-32003.patch;bug=32003;msg=8;att=1 https://debbugs.gnu.org/cgi/bugreport.cgi?filename=0001-Disable-extra-display-of-10-in-nxml-mode-Bug-32897.patch;att=1;msg=8;bug=32897 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 09:06:37 2019 Received: (at 35381) by debbugs.gnu.org; 5 May 2019 13:06:37 +0000 Received: from localhost ([127.0.0.1]:53217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNGqj-0001VY-3e for submit@debbugs.gnu.org; Sun, 05 May 2019 09:06:37 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:36261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNGqh-0001VP-48 for 35381@debbugs.gnu.org; Sun, 05 May 2019 09:06:36 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x45D6XB9020547; Sun, 5 May 2019 09:06:34 -0400 Received: by pastel.home (Postfix, from userid 20848) id 99AD76A7EB; Sun, 5 May 2019 09:06:33 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes Message-ID: References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> <87ftq5q9xa.fsf@gmail.com> <87pnoxmubz.fsf@gmail.com> Date: Sun, 05 May 2019 09:06:33 -0400 In-Reply-To: <87pnoxmubz.fsf@gmail.com> (Noam Postavsky's message of "Sat, 04 May 2019 23:52:16 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6539=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6539> : inlines <7072> : streams <1820642> : uri <2840803> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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 think that plus the patches for #32003 and #32897 should cover the > nxml fixes I'm planning for emacs-26. I'll wait for another few days > and then push. LGTM. > https://debbugs.gnu.org/cgi/bugreport.cgi?filename=0001-Fix-nxml-get-inside-Bug-32003.patch;bug=32003;msg=8;att=1 You might like to mention in nxml-get-inside what "normal strings" are used for (AFAIK that's used exclusively for attributes). > https://debbugs.gnu.org/cgi/bugreport.cgi?filename=0001-Disable-extra-display-of-10-in-nxml-mode-Bug-32897.patch;att=1;msg=8;bug=32897 - (when nxml-char-ref-extra-display + (when (and ;; Displaying literal newline is unhelpful. + (not eql n ?\n) + nxml-char-ref-extra-display) There's a bunch of parens missing. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 09:49:26 2019 Received: (at 35381) by debbugs.gnu.org; 5 May 2019 13:49:26 +0000 Received: from localhost ([127.0.0.1]:53244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNHWA-0004fy-9Y for submit@debbugs.gnu.org; Sun, 05 May 2019 09:49:26 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:45449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNHW8-0004fi-U8 for 35381@debbugs.gnu.org; Sun, 05 May 2019 09:49:25 -0400 Received: by mail-qt1-f181.google.com with SMTP id t1so11200913qtc.12 for <35381@debbugs.gnu.org>; Sun, 05 May 2019 06:49:24 -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=0jRNv0rq8yPxlyer/bQdPPaEiKB2LkMNetvOg1RLKMA=; b=h7C1+2nYUQ+hamuCUOlZbju3EmqYZ/KGCUQXzKKXmrmNThaeE1dG40TKCOA8zCCA0H ADFS3DyGizWlXe7VTOcLRjh3jQB8X+T51BnH8YqqXTB3Eyj5VAmAeUV98PFznUxDshdx lV7TmZzs7oVhkbwvJ9eJz7OGJaNFWhvLft1Dk9dwaJztjgd0Zng/uj0i2QW0pv9jaMMt 916/QVCLBue6TndMjdPwpct6PNESmTNNsrrQaRHkXmjvhFbwWvIlNUxaUZwLJFYvjufb o/jmYiFXD3UuKndCtbP8L5x5uOoZD29CXZAEg2NNafW8ARR0rk8okrVg4Z6q0jDx6LDC GLHA== 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=0jRNv0rq8yPxlyer/bQdPPaEiKB2LkMNetvOg1RLKMA=; b=Uo4lVu7Nw5iEMAP2EN0nZ/kXuqzXadkUxX/waDsPOzsH1fREnJMrxt65BqqVLe2UBp HgC5vQO4hwIMOId+37FCGUs4HofjVsO1uosluv7NnhXhfYdEEOM/XsaFHtf9b++EQtxl n7h2r/Mz89vm2cnePyyaf2Nf6UTRNMcjF4xqRZ2lB/OAtntlpqrtfWwOPKSzUskU3T7a BoEvKl8Fe/1DZv81ADzs+D1FsoUR1Crj2rnuFZ5aE9Bqk2FtdaeXqCrS8zJyiBVQACTn J0cpFEhu7J2EJ+xPARNvoXqFCjPKdqn+eyffGVYJ/4uUJUQeKc1CqAjO8FYN4jxp1oT5 jVDQ== X-Gm-Message-State: APjAAAXfzJgONOGVZI7urx0rjXP/cNJkUr9ZRPYBoBlGwQWifPi6Wws+ l1c/zw0YYK3Bv3hHJwa7IcN4iOWn X-Google-Smtp-Source: APXvYqybONEx169SFF1x2X+r+zJKMz0I+vJyAKlrkfcZceYp41L7/8GBRfUIWc+u0vEc2tM3xeCS0A== X-Received: by 2002:a0c:b50d:: with SMTP id d13mr16494709qve.222.1557064159162; Sun, 05 May 2019 06:49:19 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id o2sm2786833qkg.63.2019.05.05.06.49.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 May 2019 06:49:18 -0700 (PDT) From: Noam Postavsky To: Stefan Monnier Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> <87ftq5q9xa.fsf@gmail.com> <87pnoxmubz.fsf@gmail.com> Date: Sun, 05 May 2019 09:49:17 -0400 In-Reply-To: (Stefan Monnier's message of "Sun, 05 May 2019 09:06:33 -0400") Message-ID: <878svlm2oy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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: >> https://debbugs.gnu.org/cgi/bugreport.cgi?filename=0001-Disable-extra-display-of-10-in-nxml-mode-Bug-32897.patch;att=1;msg=8;bug=32897 > > - (when nxml-char-ref-extra-display > + (when (and ;; Displaying literal newline is unhelpful. > + (not eql n ?\n) > + nxml-char-ref-extra-display) > > There's a bunch of parens missing. How do you mean? From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 10:21:13 2019 Received: (at 35381) by debbugs.gnu.org; 5 May 2019 14:21:13 +0000 Received: from localhost ([127.0.0.1]:54610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNI0u-0005oD-75 for submit@debbugs.gnu.org; Sun, 05 May 2019 10:21:12 -0400 Received: from mout.gmx.net ([212.227.17.21]:40715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNI0p-0005nm-W0 for 35381@debbugs.gnu.org; Sun, 05 May 2019 10:21:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1557066055; bh=MjohASS8dSKDHXMBKvMvHmmmOTos34Yz95/j9ztLSNA=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=GnrvDM0Foc8JGgQ/swMoRw5mNvrINxPkuqNaLHm9Q2qv2ast23h6JUk1SJfEABD+/ 1J0/mNqi5mlYOX2vzPPfQDaZaTNb0jWBgsgyTyQNr70lFrXyrEN4VrK+Z3ZY2Br6UC SY+8rX3i5Mmyz8W+UlMDUZLv8R8/HX4w9GHCfnQI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([212.95.5.233]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MBFBB-1hVEVG1VqP-00AI55; Sun, 05 May 2019 16:20:55 +0200 Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes To: Noam Postavsky , Stefan Monnier References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> <87ftq5q9xa.fsf@gmail.com> <87pnoxmubz.fsf@gmail.com> <878svlm2oy.fsf@gmail.com> From: martin rudalics Message-ID: <13b7d4f8-ec8c-f719-6f72-b45b1479ae60@gmx.at> Date: Sun, 5 May 2019 16:20:53 +0200 MIME-Version: 1.0 In-Reply-To: <878svlm2oy.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:8dS/Tvixk5pJr18XzqDb7tAPZfg8ex2mURVQ5N9JDEKrQDVlKBN 6RQOdTBsAPWC9ZvPFv2YzHduDHCVmZqxHePWAeGm+sjzBquOw2s2gf0ob329CTCVQi+zjIY +uhlXbhnJqaTWIJD5zFCQvTAakpp/5JTskJz4v5aQeNr92JGakpVPmyV+Gqfr/iyyQQPYiA ZyGiIO9sIhSp9vvn1D2kA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:2fAIw+zXLJY=:7kn0J9mwnFkgcA0dgXxT0v fbPjfoKxJcWALIfnDQIJriMeOgm/UF6hqSviBUbFqPpXtC3RwD3qcmEY98BaqQpNm3BzMFfZ0 fuCPAwAs5upbSejCtFDvRq5J6qKtFjoKMUOUuBP7cWl0fqRKvKbBIQ0XPC7env1R4+6J5cSmw f7WXzoxDKLY8smAoW7sdOEFKeZqB2JsJD7DY7MWZfhLtvG3NJpRhoRi8+TDzeMyP3/npbtuA6 3LFhoiYXuyIL/K7+o8TNluWksnG15MJHTPPyIot6qEd+eQNq3GVOt6LLSELxi6Sf1KiAXl3zO XMHhXYFC1ntbr9rV+srUUeJwvgKKW7AO5Gx9lc8vya+aebxHSFiC3dSSCxtcYH8un8hBypFPv tW3bUolLuL7XCMuYhmUd1pSLW55mZQVR5peahlsYlUXf9p1LoKXi6iqp2xg/G9pORb4qrhVgM ++5xnZ39B+5+Hx+MbE7T4nY37mVeBksGkLUitO8oGAk1DpjLrzE71zFZM0QFGluamHJ6hvJr2 z9rU2TZXJwGgdynugIqdVesj0h7aIiw/f1GLqdeE6wLXdYBU+Gqf4v/aZoL1eF53+x81K8R+d /QaP1LGleqPOIDluRYKfRcEElHY3LPNTWhYwyQAcR5JeheseZJX1yHLMC/IjK7PylH/RkehP3 y1wkCum0+hj6jIMYpuEFs/vQu8NQIZkemf/EoscX9azmT7JGXL44xW2RNPIV4JWUm+/jxpmjI KTOLEHN7HYhsEePplEajPD6BXTwjlNJumfHQeW68BN/uHs42E5FLjIUqRju6b8lH6E29ebEgL iJ/QuMmqTIyLRLGIrMXpk9RDhDaPS77GFbLXLDzQQ8aazA8KOp/upAeZfO/VGjKaFGcDhUIsn TI3agegCLHSPcZ0+yRmiFSc40I+3Y1tQQdVsVNGiDJht1b9UrruzptoARlVo5OtJqWnFHZha6 yVCAQjVgK8w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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.7 (-) > How do you mean? I suppose Stefan means to write (not (eql n ?\n)) instead of (not eql n ?\n) martin From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 10:36:23 2019 Received: (at 35381) by debbugs.gnu.org; 5 May 2019 14:36:23 +0000 Received: from localhost ([127.0.0.1]:54630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNIFb-0006Dc-Ir for submit@debbugs.gnu.org; Sun, 05 May 2019 10:36:23 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:34786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNIFX-0006DL-OX for 35381@debbugs.gnu.org; Sun, 05 May 2019 10:36:20 -0400 Received: by mail-qt1-f170.google.com with SMTP id j6so12011382qtq.1 for <35381@debbugs.gnu.org>; Sun, 05 May 2019 07:36:19 -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=6UEqpI2Q5hzVy0wJAtA6KpdwW6EW0db/BBu2UGz/c84=; b=JWdfEOTk5+zWKQMPFNCQYu5dFQoKtkI3DWYe3DA1N9X1MgIBfAsgDnKoqhChmQFG4i 7Bjj0D3VxvE9GlOvOa9iGAVjzOqcCoeo/atahOvzeb6v0d50qquC7qEv7A0c47wb8pxL 2wPbY20q6CoN5ZjiSUKtcgOA0lnYk+plqQ+oayUGCA6gfzw499mrWvTxzQNSMHVPdTRW NaA+UQ1MhR5Xlm2k135/PNzc5rNLPiuad1QwWEMgpKbrSLhuMVnvrIMcjbo0ieMHH9+u 4lVRX2bMLz4vfY8jpo6hLDPJYey3CfMTwXy98TzzPWMVkYhJ0SCowjURFOvSlH0B6VJO JTmw== 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=6UEqpI2Q5hzVy0wJAtA6KpdwW6EW0db/BBu2UGz/c84=; b=BQ33YxRFH4KGTIivoGB/BaYBuR4DJ8bwt1YN0oS/3fTWCJk6O9w0wS6c0VETViPHF7 EaE2YuAKBIVYDK/NWmLYFfojnGLSIlDo6RKKgwj6q2m1jL2D0RSfTNiOdAovlclj4SX9 auwIG7zupaPaXaOKNl1oyGQfP57Kf0W0FgsMWQ/HeAnhwjh2fivLobyHGDU1vj00Fa3Q yShEBmLDw8XuZfF05Yf6pvL53t7+bdWrTYcDnErWcjhPiv0kbMVwcbrLO25H3J8cwbUY kbZJNE3yvuZOxin2CcqglfJo0kf1KX1H2z9iKb//dOcAkeV7Kf1dEFwcDqQRsJxQJQv6 JEmQ== X-Gm-Message-State: APjAAAXBSNGRqUyjidh0feWij5gy09AWv+zyBaturFBys4rCnCpQEZ+r 2ERcqajEkl96Y6qpp7xOyYF6Vcuc X-Google-Smtp-Source: APXvYqxV8teI3IiZzaJAssST4bz2Ip1VIcgpke1Mrp8bFvmDytZ9Q8MfvnCi3saXLCyClUX2S7hqTg== X-Received: by 2002:ac8:25bd:: with SMTP id e58mr18332801qte.273.1557066974143; Sun, 05 May 2019 07:36:14 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id v141sm4923313qka.35.2019.05.05.07.36.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 May 2019 07:36:13 -0700 (PDT) From: Noam Postavsky To: martin rudalics Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> <87ftq5q9xa.fsf@gmail.com> <87pnoxmubz.fsf@gmail.com> <878svlm2oy.fsf@gmail.com> <13b7d4f8-ec8c-f719-6f72-b45b1479ae60@gmx.at> Date: Sun, 05 May 2019 10:36:12 -0400 In-Reply-To: <13b7d4f8-ec8c-f719-6f72-b45b1479ae60@gmx.at> (martin rudalics's message of "Sun, 5 May 2019 16:20:53 +0200") Message-ID: <875zqpm0ir.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org, Stefan Monnier 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 (-) martin rudalics writes: >> How do you mean? > > I suppose Stefan means to write > > (not (eql n ?\n)) > > instead of > > (not eql n ?\n) Oh right, I had actually fixed that locally already, but forgot to update the bug thread. From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 07:46:08 2019 Received: (at 35381) by debbugs.gnu.org; 9 May 2019 11:46:08 +0000 Received: from localhost ([127.0.0.1]:34834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOhV2-0003Ey-7i for submit@debbugs.gnu.org; Thu, 09 May 2019 07:46:08 -0400 Received: from mail-it1-f179.google.com ([209.85.166.179]:50374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOhV0-00037G-KG; Thu, 09 May 2019 07:46:07 -0400 Received: by mail-it1-f179.google.com with SMTP id r17so3027624ita.0; Thu, 09 May 2019 04:46:06 -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=N630fA/7u71ugFBYXSfhvGR7SWoeGnyT04tid/VOd2w=; b=e7uFebAOXbhSVvulubpBeExdg1aj3reOSdT9gLGLRpFW2g5CbEkTPaX5pzLXiOItih w58Z3+gGif8k9yB4yK4h1tcJ/CJCV8EJoOEjFHBzapPx0VK1wWesXpnkGT7hlBYVkYJR zluN8Nh40EAHrAyQPO4Xop15R/kvu3Q6qRAMzqGV3pqTcTERUWHXKZwms52nOk1IwE4J wNOYXzsnCwLQBugVnGWEBTspkGuIuG6Eh0GYqJr1eDFO286d6BlYTjBTefgv0FqTWncI FGuiwyUJeP8pIvr6oAty3wAyrGj8nojhNEsRKJ41EPcyPc1Zy6qhgVhC7cYMK9/Y54ss RfRw== 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=N630fA/7u71ugFBYXSfhvGR7SWoeGnyT04tid/VOd2w=; b=FO29PRMSkNvblMpehBS07h8SAo0GVtAM23vSpJAwV7OaZ/NNL5+saQPWJZzeI3wApC RI46Wtm9jnri7qiClpK004nl0yQLDdtnN5EFKhHduPWq6aEPq2eSpbUtgX66AnsF4zIf tIpd3JuZ9ASYSnLqcNn593uMuc1SoUNhXkt1UoDMm2seF7YTlknk8to15DgYfIuAkijd wLtfPWrgmylRN7J5VDE622qDDO0QP281mjYIe4vd2J9hd45Ho1Rn2Q9xaZlM/Tw0RnTM 1RPdEm/+l998rL8Sthbuq3JC0UJpDwRuxBDp1EY9QPAgILu04d6WPMKE7cuCLJ3JB8U1 knUQ== X-Gm-Message-State: APjAAAXWgMeBFksukLoN/yy2TFu+SXn9LH/MBm4K8Lns2TwQkOiRVmE1 Oo9yCNUKbC+g98VVXXKdi4Gl6g7Y X-Google-Smtp-Source: APXvYqxm5oCPqzNQeQ7Tx+jixDqBs8DhzFPfg8koobOznfp5qmYDYfY5YL9XKnYmRIryvgBQe89mMQ== X-Received: by 2002:a24:2191:: with SMTP id e139mr2515434ita.119.1557402360664; Thu, 09 May 2019 04:46:00 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id e9sm212309iol.60.2019.05.09.04.45.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 May 2019 04:45:59 -0700 (PDT) From: Noam Postavsky To: Stefan Monnier Subject: Re: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> <87ftq5q9xa.fsf@gmail.com> <87pnoxmubz.fsf@gmail.com> Date: Thu, 09 May 2019 07:45:59 -0400 In-Reply-To: <87pnoxmubz.fsf@gmail.com> (Noam Postavsky's message of "Sat, 04 May 2019 23:52:16 -0400") Message-ID: <87imujkg08.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35381 Cc: 35381@debbugs.gnu.org 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 35381 fixed close 35381 26.3 quit > I think that plus the patches for #32003 and #32897 should cover the > nxml fixes I'm planning for emacs-26. I'll wait for another few days > and then push. Done. 7dab3ee7ab 2019-05-09T06:42:40-04:00 "Recognize single quote attribute values in nxml and sgml (Bug#35381)" https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=7dab3ee7ab54b3c2e7bc24170376054786c01d6f From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 08:10:23 2019 Received: (at control) by debbugs.gnu.org; 9 May 2019 12:10:23 +0000 Received: from localhost ([127.0.0.1]:34865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOhsS-0006sz-L5 for submit@debbugs.gnu.org; Thu, 09 May 2019 08:10:22 -0400 Received: from mail-it1-f182.google.com ([209.85.166.182]:38684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOhsP-0006sg-29; Thu, 09 May 2019 08:10:17 -0400 Received: by mail-it1-f182.google.com with SMTP id i63so2310566ita.3; Thu, 09 May 2019 05:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=jHQ5EcLzU0xCBIT9njnP6mDoPVcq9KfD6x1ctbe6uJg=; b=tMcr4GCzYUj91bAdSTttYWX8a+VMe8NQr2OlzDrZYVgdyVe3Snw5YoLWJ+EYUxqR50 WBb71yvsWqivv9KPaNf1ywq4h/Dj8/4ZhazcNDajqm5obrf0qZ9YmUu1ScfgQMOLGAb+ nV86zz+/7aHAwukL88WKW6L/hfPC64Cu1pK9DDqcFcqMBvI4f6/Emh/qGBOEqIlGGCxu I2F4Tw4q/gmx/4sM79y5evDAdkPYJVJWOGTaLFzESgX7mLcO5cUQctf6GhvKtlX/QFxL rV43CRpl1E0kItBszNcQlLiyogEovGzMYxpa1Gjkn7CeRGfKKv3+K1l7h7NJ2Wd8JSI4 IERA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=jHQ5EcLzU0xCBIT9njnP6mDoPVcq9KfD6x1ctbe6uJg=; b=jC4HKMXyc9xMPxNRrArBpVLf0lLCX6VcRT1N0j2Nyi4iA5YlnGFmPaqpB+/W09cMtN iDvqjUWnDOdxNMdB9UQVi8dXLCaGowcO0UKFwW9B5L+7629+tDsoyBlniiqt0nQiJk9I Gtl2TzeABlDp+DHGMTnkKQaZ2j2zglVlCRW7CkRwvzK6kDU3TxuuREetBfmzyetPi/OF wdz5mDzogQgOsNq1UGtJ1lwsfq6cA9H717W2cbT+l2CaYD1SU7CEucBvZ5dHJdC5MSjF M1hTRBNa03NhtfJG6KhEOR7FWhiVk2tqZtqObGA1HNjPfyqmTrYgsRXq8F1Oro7Jzjwg rGoA== X-Gm-Message-State: APjAAAVe/B2VuWgn4W5VyZ7nDuaHncgqpgVhy+XF8215TB3I9kgTICFY 4iJqzrFJlAP5kqdK6+DvHXh0sr9s X-Google-Smtp-Source: APXvYqyYZCY/yIfsCVvnv3Xyb2lHCwO/gc9OZ/oe2H3Qnec45j5SnQ/4O4IEGbQmbP9ZQDE9VrFfsw== X-Received: by 2002:a24:69c3:: with SMTP id e186mr2481646itc.37.1557403811202; Thu, 09 May 2019 05:10:11 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id j5sm827278ita.16.2019.05.09.05.10.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 May 2019 05:10:10 -0700 (PDT) From: Noam Postavsky To: 8203@debbugs.gnu.org Subject: Re: bug#8203: sgml-delete-tag bug References: Date: Thu, 09 May 2019 08:10:09 -0400 In-Reply-To: (Noam Postavsky's message of "Sun, 5 Jun 2016 10:44:07 -0400") Message-ID: <87ftpnkevy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 (-) forcemerge 35381 8203 quit Noam Postavsky writes: > (defconst sgml-tag-syntax-table > ... > (unless (memq ?' sgml-specials) > ;; Avoid that skipping a tag backwards skips any "'" prefixing it. > (modify-syntax-entry ?' "w" table)) > > But it seems like `sgml-tag-syntax-table' is not applied in sufficient cases. This was fixed along with Bug#35381. From unknown Wed Jun 18 23:11:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 07 Jun 2019 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator