summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
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)))