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 | 0a3d6ca624332470f406e579f3ed5912169273ea (patch) | |
tree | e612dc8fc59203d045b613bf6776b4e5e9f50d56 /elisp/geiser-syntax.el | |
parent | 94210cde9788f9ae677767a531f96a873f5feaf0 (diff) | |
download | geiser-guile-0a3d6ca624332470f406e579f3ed5912169273ea.tar.gz geiser-guile-0a3d6ca624332470f406e579f3ed5912169273ea.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))) |