diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2019-05-15 01:27:41 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2019-05-15 01:27:41 +0100 |
commit | ab3e17daf61d5421fc8e72edadb8d2fa611329c9 (patch) | |
tree | 12a1ac936a66f915f0bc83474fd9988ac2a619e4 /elisp | |
parent | 156970ff1402512b4bbf53a5e1c22156cb0e2f9c (diff) | |
download | geiser-guile-ab3e17daf61d5421fc8e72edadb8d2fa611329c9.tar.gz geiser-guile-ab3e17daf61d5421fc8e72edadb8d2fa611329c9.tar.bz2 |
Alias for font-lock-ensure (should fix #274)
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-base.el | 10 | ||||
-rw-r--r-- | elisp/geiser-repl.el | 4 | ||||
-rw-r--r-- | elisp/geiser-syntax.el | 4 |
3 files changed, 13 insertions, 5 deletions
diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el index aefff5f..95fdc03 100644 --- a/elisp/geiser-base.el +++ b/elisp/geiser-base.el @@ -1,6 +1,6 @@ ;;; geiser-base.el --- shared bits -;; Copyright (C) 2009, 2010, 2012, 2013, 2015, 2016 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2012, 2013, 2015, 2016, 2019 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -27,6 +27,14 @@ (let ((inhibit-changing-match-data t)) (looking-at regexp)))) +(defalias 'geiser--font-lock-ensure + (if (fboundp 'font-lock-ensure) + #'font-lock-ensure + (with-no-warnings + (lambda (&optional _beg _end) + (when font-lock-mode + (font-lock-fontify-buffer)))))) + ;;; Utilities: (defsubst geiser--chomp (str) diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 61ab1e0..abba2ea 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -452,8 +452,8 @@ module command as a string") `(read-only ,geiser-repl-read-only-output-p)) (geiser-repl--fontify-output-region geiser-repl--last-output-start geiser-repl--last-output-end) - (font-lock-ensure geiser-repl--last-output-start - geiser-repl--last-output-end)))) + (geiser--font-lock-ensure geiser-repl--last-output-start + geiser-repl--last-output-end)))) (geiser-con--connection-update-debugging geiser-repl--connection txt) (geiser-image--replace-images geiser-repl-inline-images-p diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index 3cc875c..475a092 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -1,6 +1,6 @@ ;;; geiser-syntax.el -- utilities for parsing scheme syntax -;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -513,7 +513,7 @@ implementation-specific entries for font-lock-keywords.") (or geiser-default-implementation (car geiser-active-implementations)))) (scheme-mode)) - (font-lock-ensure) + (geiser--font-lock-ensure) (let ((pos (point-min)) next) (while (setq next (next-property-change pos)) ;; Handle additional properties from font-lock, so as to |