summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2016-06-12 18:32:48 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2016-06-12 18:32:48 +0200
commit0a3d6ca624332470f406e579f3ed5912169273ea (patch)
treee612dc8fc59203d045b613bf6776b4e5e9f50d56 /elisp/geiser-syntax.el
parent94210cde9788f9ae677767a531f96a873f5feaf0 (diff)
downloadgeiser-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.el13
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)))