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
commite33305afaef53e296cbcf468dafec460f3661793 (patch)
tree39511085271c318bebc9dd79dc43a5b22b98facf /elisp/geiser-syntax.el
parentbb990e11cd91956d10d156982d29cec50fee75bf (diff)
downloadgeiser-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.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)))