summaryrefslogtreecommitdiff
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
commit467aded542e8428b90549727dafbb4d6bcb07cd4 (patch)
treeef56633296b1009981628fa216dc9190f0e4360b
parent48e2b0059f7c92f6010cd338d76e6b4d9c69c2a9 (diff)
downloadgeiser-guile-467aded542e8428b90549727dafbb4d6bcb07cd4.tar.gz
geiser-guile-467aded542e8428b90549727dafbb4d6bcb07cd4.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.
-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)