From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#49629: 27.2; electric-pair-mode doesn't work for angle brackets in HTML file Date: Fri, 24 Dec 2021 09:23:06 -0500 Message-ID: References: <801r7vgoxm.fsf@felesatra.moe> <87im11gbxf.fsf_-_@gnus.org> <8735rybg2f.fsf@gnus.org> <87tuk978gm.fsf@gnus.org> <80zgoq48p1.fsf@felesatra.moe> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24930"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 49629@debbugs.gnu.org To: Allen Li Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 24 15:24:19 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0lUZ-0006Dw-0b for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Dec 2021 15:24:19 +0100 Original-Received: from localhost ([::1]:47048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0lUX-0004p7-8t for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Dec 2021 09:24:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0lUK-0004oo-EV for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 09:24:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0lUI-0007j2-G9 for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 09:24:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0lUI-0004G8-2Q for bug-gnu-emacs@gnu.org; Fri, 24 Dec 2021 09:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Dec 2021 14:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49629 X-GNU-PR-Package: emacs Original-Received: via spool by 49629-submit@debbugs.gnu.org id=B49629.164035580116280 (code B ref 49629); Fri, 24 Dec 2021 14:24:02 +0000 Original-Received: (at 49629) by debbugs.gnu.org; 24 Dec 2021 14:23:21 +0000 Original-Received: from localhost ([127.0.0.1]:35917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0lTc-0004EW-Pz for submit@debbugs.gnu.org; Fri, 24 Dec 2021 09:23:20 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0lTX-0004E4-5M for 49629@debbugs.gnu.org; Fri, 24 Dec 2021 09:23:19 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 36D068051E; Fri, 24 Dec 2021 09:23:09 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D31C180172; Fri, 24 Dec 2021 09:23:07 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1640355787; bh=ErlRjyDFC+N+wX7Pc5O8LNRkdp4JX4qdhV399qH7WIg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ehD1y89xNiOpTLnZ9vhBS0Krx8rKd/pIIg+hHeU12AHPuuOOp6NWaq5IvwwZJcyKc hqg6g9qlVZ6F0AbmRMpilSOQwC7Z5TuCOqeKOEzsq3ZhqfCzoFyP7l/nkT2Ora4QNM tjkqUtjVbj/bobY7pvgWKk65yPzNdbKBrUI2e9j+ELj9JPfNq5cd4th8rTj8HQ9McD P24LMUW84Q0i2uvFDtupao3EOtFTxQjung5zC0eRgIjLf8FoAw/aSgMoYGv8adlVz2 WWJpIUm+yv1awOClMuhlx79V24etzuEyVD60wcmratR03c7r+XgkYFxgzvZba/5q8o Xi0IHAl9HGsEw== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A07D71202C1; Fri, 24 Dec 2021 09:23:07 -0500 (EST) In-Reply-To: <80zgoq48p1.fsf@felesatra.moe> (Allen Li's message of "Fri, 24 Dec 2021 02:07:54 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223053 Archived-At: > -(defun sgml-syntax-propertize (start end) > +(defconst sgml--syntax-propertize > + (syntax-propertize-rules sgml-syntax-propertize-rules)) > + > +(defun sgml-syntax-propertize (start end &optional rules-function) > "Syntactic keywords for `sgml-mode'." > (setq sgml--syntax-propertize-ppss (cons start (syntax-ppss start))) > (cl-assert (>= (cadr sgml--syntax-propertize-ppss) 0)) > (sgml-syntax-propertize-inside end) > - (funcall > - (syntax-propertize-rules sgml-syntax-propertize-rules) > - start end) > + (funcall (or rules-function sgml--syntax-propertize) (point) end) > ;; Catch any '>' after the last quote. > (sgml--syntax-propertize-ppss end)) > > In the final `funcall`, the `start` argument was changed to `(point)`. > Looking at the overall commit, this seems unintentional to me. No, this was intentional: `start` is used by passing it to `syntax-ppss` which will move point to `start`. After that some of the text may/will be handled by `sgml-syntax-propertize-inside` which indicates it by moving point past the part that it handled (if any) and the (or rules-function sgml--syntax-propertize) should only apply to the remaining part. Stefan