summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiogo F. S. Ramos <dfsr@riseup.net>2014-02-24 17:46:50 -0300
committerJose Antonio Ortega Ruiz <jao@gnu.org>2014-02-25 00:42:45 +0100
commitd2b9757f6c3e13e6b5cbd39a86d7ef2f3f67b023 (patch)
treedccd5ffe151e50be689ff78a05129ca19deb50bb
parent0a0d8c9b7bde63362e8336d089ab2066669e9f71 (diff)
downloadgeiser-d2b9757f6c3e13e6b5cbd39a86d7ef2f3f67b023.tar.gz
geiser-d2b9757f6c3e13e6b5cbd39a86d7ef2f3f67b023.tar.bz2
Font lock `define-syntax-rule' like `define' procedures
`define-syntax-rule' is similar enough to procedure definitions that it should be highlight as a slightly different version of one. The faces were chosen to keep the same scheme used by `define-macro'. `define-syntax-rule' was removed from Racket's extra keywords as there is no need to special case it.
-rw-r--r--elisp/geiser-syntax.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 7a33770..8b427f6 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -52,8 +52,12 @@
;;; Extra syntax keywords
(defconst geiser-syntax--keywords
- '(("\\[\\(else\\)\\>" . 1)
- ("(\\(parameterize\\)\\>" . 1)))
+ `(("\\[\\(else\\)\\>" . 1)
+ ("(\\(parameterize\\)\\>" . 1)
+ (,(rx "(" (group "define-syntax-rule") eow (* space)
+ (? "(") (? (group (1+ word))))
+ (1 font-lock-keyword-face)
+ (2 font-lock-variable-name-face))))
(font-lock-add-keywords 'scheme-mode geiser-syntax--keywords)