From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#35381: 26.2; nxml-mode doesn't fontify attributes in single quotes Date: Fri, 26 Apr 2019 07:32:17 -0400 Message-ID: <87ftq5q9xa.fsf@gmail.com> References: <87imv6rpig.fsf@gmail.com> <87v9z4qjit.fsf@gmail.com> <87mukerfd2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="225191"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: 35381@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 26 13:33:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJz6T-000wPc-8J for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Apr 2019 13:33:17 +0200 Original-Received: from localhost ([127.0.0.1]:45356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJz6S-0004c6-6E for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Apr 2019 07:33:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJz6H-0004ZX-AR for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2019 07:33:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJz6G-0001g6-76 for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2019 07:33:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46677) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJz6G-0001fY-3W for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2019 07:33:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJz6E-0007hi-LO for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2019 07:33:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Apr 2019 11:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35381 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35381-submit@debbugs.gnu.org id=B35381.155627834829277 (code B ref 35381); Fri, 26 Apr 2019 11:33:02 +0000 Original-Received: (at 35381) by debbugs.gnu.org; 26 Apr 2019 11:32:28 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: (Stefan Monnier's message of "Thu, 25 Apr 2019 08:47:07 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158288 Archived-At: 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.")