GNU bug report logs -
#49629
27.2; electric-pair-mode doesn't work for angle brackets in HTML file
Previous Next
Reported by: Allen Li <darkfeline <at> felesatra.moe>
Date: Sun, 18 Jul 2021 23:53:01 UTC
Severity: normal
Found in version 27.2
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 49629 <at> debbugs.gnu.org (full text, mbox):
> -(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
This bug report was last modified 3 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.