diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2016-06-12 00:54:54 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2016-06-12 00:54:54 +0200 |
commit | 84db2d2cd28c2f3185483f52d1d3e83b8ee628ea (patch) | |
tree | c2d04aa1067c1c647dabddd3b724f03f3c85e954 | |
parent | 345a0a0281f65755756f5a3282aa953764726ce6 (diff) | |
download | geiser-guile-84db2d2cd28c2f3185483f52d1d3e83b8ee628ea.tar.gz geiser-guile-84db2d2cd28c2f3185483f52d1d3e83b8ee628ea.tar.bz2 |
Registering *global* font-lock keywords in REPLs at the right time
We were adding only the scheme-specific ones.
-rw-r--r-- | elisp/geiser-repl.el | 2 | ||||
-rw-r--r-- | elisp/geiser-syntax.el | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index f0ba31b..efdcfc3 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -281,7 +281,7 @@ module command as a string") (unless old (geiser-repl-mode) (geiser-impl--set-buffer-implementation impl) - (geiser-syntax--add-kws))))) + (geiser-syntax--add-kws t))))) (defun geiser-repl--read-impl (prompt &optional active) (geiser-impl--read-impl prompt (and active (geiser-repl--active-impls)))) diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index ea972e9..ce64171 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -134,11 +134,12 @@ implementation-specific entries for font-lock-keywords.") (geiser-impl--define-caller geiser-syntax--case-sensitive case-sensitive () "A flag saying whether keywords are case sensitive.") -(defun geiser-syntax--add-kws () +(defun geiser-syntax--add-kws (&optional global-p) (when (not (and (boundp 'quack-mode) quack-mode)) (let ((kw (geiser-syntax--impl-kws geiser-impl--implementation)) (cs (geiser-syntax--case-sensitive geiser-impl--implementation))) (when kw (font-lock-add-keywords nil kw)) + (when global-p (font-lock-add-keywords nil (geiser-syntax--keywords))) (setq font-lock-keywords-case-fold-search (not cs))))) |