Change font-lock-extend-region-multiline handling in mhtml-mode
Bug#29159 * lisp/textmodes/mhtml-mode.el (mhtml-mode): Remove font-lock-extend-region-multiline from font-lock-extend-region-functions. (mhtml--extend-font-lock-region): Call font-lock-extend-region-multiline.
This commit is contained in:
parent
a8664cc998
commit
cfa2a944d4
1 changed files with 7 additions and 2 deletions
|
@ -198,6 +198,12 @@ smallest."
|
||||||
(get-text-property orig-end 'mhtml-submode))
|
(get-text-property orig-end 'mhtml-submode))
|
||||||
(cl-decf font-lock-end)))
|
(cl-decf font-lock-end)))
|
||||||
|
|
||||||
|
;; Also handle the multiline property -- but handle it here, and
|
||||||
|
;; not via font-lock-extend-region-functions, to avoid the
|
||||||
|
;; situation where the two extension functions disagree.
|
||||||
|
;; See bug#29159.
|
||||||
|
(font-lock-extend-region-multiline)
|
||||||
|
|
||||||
(or (/= font-lock-beg orig-beg)
|
(or (/= font-lock-beg orig-beg)
|
||||||
(/= font-lock-end orig-end))))
|
(/= font-lock-end orig-end))))
|
||||||
|
|
||||||
|
@ -365,8 +371,7 @@ the rules from `css-mode'."
|
||||||
(setq-local font-lock-fontify-region-function
|
(setq-local font-lock-fontify-region-function
|
||||||
#'mhtml--submode-fontify-region)
|
#'mhtml--submode-fontify-region)
|
||||||
(setq-local font-lock-extend-region-functions
|
(setq-local font-lock-extend-region-functions
|
||||||
'(mhtml--extend-font-lock-region
|
'(mhtml--extend-font-lock-region))
|
||||||
font-lock-extend-region-multiline))
|
|
||||||
|
|
||||||
;; Attach this to both pre- and post- hooks just in case it ever
|
;; Attach this to both pre- and post- hooks just in case it ever
|
||||||
;; changes a key binding that might be accessed from the menu bar.
|
;; changes a key binding that might be accessed from the menu bar.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue