mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
Smarter filling of text in jupyter-repl-fontify-according-to-mode
This commit is contained in:
parent
c58cf8767e
commit
4ee9ff2ee4
1 changed files with 11 additions and 3 deletions
|
@ -220,9 +220,17 @@ string, which can then be inserted into a Jupyter REPL buffer."
|
|||
new-prop))))
|
||||
(setq pos next))))
|
||||
(jupyter-repl-add-font-lock-properties (point-min) (point-max))
|
||||
(unless (memq fill-forward-paragraph-function
|
||||
'(forward-paragraph))
|
||||
(fill-region (point-min) (point-max) t t t))
|
||||
(cond
|
||||
((and fill-paragraph-function
|
||||
(not (eq fill-paragraph-function t)))
|
||||
(goto-char (point-min))
|
||||
(fill-paragraph)
|
||||
(while (and (= (fill-forward-paragraph 1) 0)
|
||||
(/= (point) (point-max)))
|
||||
(fill-paragraph)))
|
||||
((not (memq fill-forward-paragraph-function
|
||||
'(forward-paragraph)))
|
||||
(fill-region (point-min) (point-max))))
|
||||
(buffer-string)))
|
||||
|
||||
(defun jupyter-repl-insert (&rest args)
|
||||
|
|
Loading…
Add table
Reference in a new issue