Make python.el compatible with Emacs 29.1
* lisp/progmodes/python.el (python--treesit-fontify-string): Don't call treesit--compute-font-lock-level unless it is fboundp. (Bug#76873)
This commit is contained in:
parent
8ea65ac642
commit
46f9ebaec3
1 changed files with 8 additions and 5 deletions
|
@ -1108,11 +1108,14 @@ fontified."
|
|||
'font-lock-doc-face
|
||||
'font-lock-string-face))
|
||||
|
||||
(ignore-interpolation (not
|
||||
(seq-some
|
||||
(lambda (feats) (memq 'string-interpolation feats))
|
||||
(seq-take treesit-font-lock-feature-list
|
||||
(treesit--compute-font-lock-level treesit-font-lock-level)))))
|
||||
(ignore-interpolation
|
||||
(not (seq-some
|
||||
(lambda (feats) (memq 'string-interpolation feats))
|
||||
(seq-take treesit-font-lock-feature-list
|
||||
(if (fboundp 'treesit--compute-font-lock-level)
|
||||
(treesit--compute-font-lock-level
|
||||
treesit-font-lock-level)
|
||||
treesit-font-lock-level)))))
|
||||
;; If interpolation is enabled, highlight only
|
||||
;; string_start/string_content/string_end children. Do not
|
||||
;; touch interpolation node that can occur inside of the
|
||||
|
|
Loading…
Add table
Reference in a new issue