mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-04 15:41:37 -05:00
Don't narrow to REPL cell when fontifying syntactically
There is no need to do so since `jupyter-repl-font-lock-fontify-region` already takes care of narrowing to cell bounds and `font-lock-syntactic-face-function` is called during the fontification process of the narrowed cell.
This commit is contained in:
parent
477dcfd71c
commit
303a8f2e81
1 changed files with 1 additions and 8 deletions
|
@ -1793,11 +1793,6 @@ VERBOSE has the same meaning as in
|
|||
(forward-char)
|
||||
(skip-syntax-forward "^()\"")))))
|
||||
|
||||
(defun jupyter-repl-font-lock-syntactic-face-function (face-fun state)
|
||||
"Narrow to the input cell, use FACE-FUN to obtain the face given STATE."
|
||||
(jupyter-with-repl-cell
|
||||
(funcall face-fun state)))
|
||||
|
||||
(cl-defgeneric jupyter-repl-initialize-fontification ()
|
||||
"Initialize fontification for the current REPL buffer."
|
||||
(let (fld frf sff spf comment)
|
||||
|
@ -1823,9 +1818,7 @@ VERBOSE has the same meaning as in
|
|||
(cons 'font-lock-fontify-region-function
|
||||
(apply-partially
|
||||
#'jupyter-repl-font-lock-fontify-region frf))
|
||||
(cons 'font-lock-syntactic-face-function
|
||||
(apply-partially
|
||||
#'jupyter-repl-font-lock-syntactic-face-function sff)))))
|
||||
(cons 'font-lock-syntactic-face-function sff))))
|
||||
(setq-local comment-start comment)
|
||||
(setq font-lock-defaults
|
||||
(apply #'list kws kws-only case-fold syntax-alist vars)))
|
||||
|
|
Loading…
Add table
Reference in a new issue