summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorDiogo F. S. Ramos <dfsr@riseup.net>2014-02-28 17:43:35 -0300
committerJose Antonio Ortega Ruiz <jao@gnu.org>2014-03-07 13:19:40 +0100
commitc74baab7509c68e0db09870954a8de3a3e7727aa (patch)
tree5f75ef9b6e694aaeb687025e7312bd7698c8a606 /elisp
parentd903e2c8df9dc7b02e1e89d135b961810914005d (diff)
downloadgeiser-chez-c74baab7509c68e0db09870954a8de3a3e7727aa.tar.gz
geiser-chez-c74baab7509c68e0db09870954a8de3a3e7727aa.tar.bz2
Highlight `define-once'
Guile's `define-once' allows defining a variable only once, but its syntax is different from `define', so its highlight is different.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-guile.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index bc96973..5bfff4d 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -248,9 +248,13 @@ This function uses `geiser-guile-init-file' if it exists."
;;; Keywords and syntax
(defun geiser-guile--keywords ()
- (when geiser-guile-extra-keywords
- `((,(format "[[(]%s\\>" (regexp-opt geiser-guile-extra-keywords 1))
- . 1))))
+ (append
+ (when geiser-guile-extra-keywords
+ `((,(format "[[(]%s\\>" (regexp-opt geiser-guile-extra-keywords 1))
+ . 1)))
+ `((,(rx "(" (group "define-once") eow (* space) (? (group (+ word))))
+ (1 font-lock-keyword-face)
+ (2 font-lock-variable-name-face nil t)))))
(geiser-syntax--scheme-indent
(c-declare 0)