diff options
author | Noam Postavsky <npostavs@gmail.com> | 2019-05-18 14:54:36 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2019-06-04 08:42:50 -0400 |
commit | 3f2bfe9a1955df3832a78bdfbb03314875601730 (patch) | |
tree | 986ebbfe1b0cb25fd743d4e7834e34d66fd2368e /lisp/nxml/nxml-rap.el | |
parent | d414c93b062cc3e245a6db0cb764d354d037bd42 (diff) | |
download | emacs-3f2bfe9a1955df3832a78bdfbb03314875601730.tar.gz |
Keep nxml-prolog-end up to date (Bug#18871)
The change on 2016-01-16 "lisp/nxml: Use syntax-tables for comments"
removed the update of nxml-prolog-end, although it already failed to
work correctly after 2013-10-07 "* lisp/nxml/nxml-mode.el: Use
lexical-binding and syntax-propertize."
* lisp/nxml/nxml-rap.el: New function.
* lisp/nxml/nxml-mode.el (nxml-mode): Add it to
after-change-functions.
Diffstat (limited to 'lisp/nxml/nxml-rap.el')
-rw-r--r-- | lisp/nxml/nxml-rap.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/nxml/nxml-rap.el b/lisp/nxml/nxml-rap.el index 21dbaded25a..3be413ae00b 100644 --- a/lisp/nxml/nxml-rap.el +++ b/lisp/nxml/nxml-rap.el @@ -108,6 +108,12 @@ Return nil if the character at POS is not inside." (setq nxml-prolog-regions (xmltok-forward-prolog)) (setq nxml-prolog-end (point)))) +(defun nxml-maybe-rescan-prolog (start _end _length) + "Reparse the prolog if START lies within it. +`nxml-mode' adds this function on `after-change-functions'." + (when (<= start nxml-prolog-end) + (save-excursion + (nxml-scan-prolog)))) ;;; Random access parsing |