diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-14 20:19:10 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-14 20:43:26 +0100 |
commit | a07fcbb866082f533acbe89e028d05d4a3904b2a (patch) | |
tree | fa74a78d0a24c391b62f3bcd237bdebb0f4550f5 /elisp/geiser-guile.el | |
parent | 39d79b5b02bfa183715996b15e7b3ca2b87973b9 (diff) | |
download | geiser-guile-a07fcbb866082f533acbe89e028d05d4a3904b2a.tar.gz geiser-guile-a07fcbb866082f533acbe89e028d05d4a3904b2a.tar.bz2 |
Support for implementation-specific font lock keywords
Spinning up from correct fontification of [else in this brave Racket
world.
I'm keeping the list of extra keywords lean and mean, but making it
customizable in both Racket and Guile.
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r-- | elisp/geiser-guile.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el index a53395d..865c7fc 100644 --- a/elisp/geiser-guile.el +++ b/elisp/geiser-guile.el @@ -87,6 +87,11 @@ effect on new REPLs. For existing ones, use the command (repeat :tag "Custom" symbol)) :group 'geiser-guile) +(geiser-custom--defcustom geiser-guile-extra-keywords nil + "Extra keywords highlighted in Guile scheme buffers." + :type '(repeat string) + :group 'geiser-guile) + ;;; REPL support: @@ -207,6 +212,13 @@ This function uses `geiser-guile-init-file' if it exists." (re-search-forward geiser-guile--guess-re nil t))) +;;; Keywords +(defun geiser-guile--keywords () + (when geiser-guile-extra-keywords + `((,(format "[[(]%s\\>" (regexp-opt geiser-guile-extra-keywords 1)) + . 1)))) + + ;;; Compilation shell regexps (defconst geiser-guile--path-rx "^In \\([^:\n ]+\\):\n") @@ -284,7 +296,8 @@ it spawn a server thread." (find-symbol-begin geiser-guile--symbol-begin) (display-error geiser-guile--display-error) (display-help) - (check-buffer geiser-guile--guess)) + (check-buffer geiser-guile--guess) + (keywords geiser-guile--keywords)) (geiser-impl--add-to-alist 'regexp "\\.scm$" 'guile nil) |