From b546724392d02a991e8d7a4db6286f5a1fea8080 Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Sat, 16 Jan 2021 17:18:54 -0600 Subject: [PATCH] Don't add the font-lock-multiline property to finalized cell text The boundaries of cell text are already considered by `jupyter-repl-map-cells` (called during fontification) so there is no need to, in addition, have the `font-lock-multiline` property (see the documentation of `font-lock-extend-region-functions` for what that property is meant to do). With regards to the comment, since the buffer is narrowed to the cell text during fontification, syntactic fontification is contained within the cell. --- jupyter-repl.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jupyter-repl.el b/jupyter-repl.el index 43644f7..6b0a80c 100644 --- a/jupyter-repl.el +++ b/jupyter-repl.el @@ -739,9 +739,7 @@ Place `point' at `point-max'." ;; cell or after any continuation prompts. See ;; `jupyter-repl-insert-prompt'. (remove-text-properties beg (point) '(rear-nonsticky)) - ;; font-lock-multiline to avoid improper syntactic elements from - ;; spilling over to the rest of the buffer. - (add-text-properties beg (point) '(read-only t font-lock-multiline t)) + (add-text-properties beg (point) '(read-only t)) ;; reset the undo list so that a completed cell doesn't get undone. (setq buffer-undo-list '((t . 0)))))