diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2016-06-12 18:32:48 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2016-06-12 18:32:48 +0200 |
commit | e33305afaef53e296cbcf468dafec460f3661793 (patch) | |
tree | 39511085271c318bebc9dd79dc43a5b22b98facf /elisp/geiser-syntax.el | |
parent | bb990e11cd91956d10d156982d29cec50fee75bf (diff) | |
download | geiser-e33305afaef53e296cbcf468dafec460f3661793.tar.gz geiser-e33305afaef53e296cbcf468dafec460f3661793.tar.bz2 |
Real fix fontification on scheme switch
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r-- | elisp/geiser-syntax.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index 0abd03c..fb579e7 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -487,16 +487,19 @@ implementation-specific entries for font-lock-keywords.") (scheme-mode))) buffer)) +(defun geiser-syntax--fontify (&optional beg end) + (let ((font-lock-verbose nil) + (beg (or beg (point-min))) + (end (or end (point-max)))) + (font-lock-flush beg end) + (font-lock-ensure beg end))) + (defun geiser-syntax--scheme-str (str) (save-current-buffer (set-buffer (geiser-syntax--font-lock-buffer)) (erase-buffer) (insert str) - (let ((font-lock-verbose nil)) - (if (fboundp 'font-lock-ensure) - (font-lock-ensure) - (with-no-warnings - (font-lock-fontify-buffer)))) + (geiser-syntax--fontify) (buffer-string))) |