summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-chicken.el42
-rw-r--r--elisp/geiser-syntax.el43
2 files changed, 64 insertions, 21 deletions
diff --git a/elisp/geiser-chicken.el b/elisp/geiser-chicken.el
index 135d345..59894bf 100644
--- a/elisp/geiser-chicken.el
+++ b/elisp/geiser-chicken.el
@@ -26,19 +26,37 @@
(eval-when-compile (require 'cl))
-
(defconst geiser-chicken-builtin-keywords
- '("and-let*" "assume" "compiler-typecase" "cond-expand" "condition-case"
- "cut" "cute" "declare" "define-constant" "define-inline" "define-interface"
- "define-record" "define-record-type" "define-specialization"
- "define-syntax-rule" "define-type" "define-values" "dotimes" "ecase"
- "fluid-let" "foreign-lambda" "foreign-lambda*" "foreign-primitive"
- "foreign-safe-lambda" "foreign-safe-lambda*" "functor" "handle-exceptions"
- "import" "let*-values" "let-location" "let-optionals" "let-optionals*"
- "let-values" "letrec*" "letrec-values" "match-letrec" "module"
- "parameterize" "regex-case" "require-extension" "select" "set!"
- "unless" "use" "when" "with-input-from-pipe" "match" "match-lambda"
- "match-lambda*" "match-let" "match-let*" "receive"))
+ '("assume"
+ "compiler-typecase"
+ "cond-expand"
+ "condition-case"
+ "declare"
+ "define-constant"
+ "define-inline"
+ "define-interface"
+ "define-record"
+ "define-specialization"
+ "define-type"
+ "dotimes"
+ "ecase"
+ "fluid-let"
+ "foreign-lambda"
+ "foreign-lambda*"
+ "foreign-primitive"
+ "foreign-safe-lambda"
+ "foreign-safe-lambda*"
+ "functor"
+ "handle-exceptions"
+ "let-location"
+ "let-optionals"
+ "let-optionals*"
+ "letrec-values"
+ "module"
+ "regex-case"
+ "select"
+ "use"
+ "with-input-from-pipe"))
;;; Customization:
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index bc110d9..091a8b4 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -51,14 +51,30 @@
;;; Extra syntax keywords
-(defconst geiser-syntax--keywords
- `(("\\[\\(else\\)\\>" . 1)
- ("(\\(parameterize\\)\\>" . 1)
- (,(rx "(" (group "define-syntax-rule") eow (* space)
- (? "(") (? (group (1+ word))))
- (1 font-lock-keyword-face)
- (2 font-lock-function-name-face nil t))
- (,(rx "(" (group "when") eow) . 1)))
+
+(defconst geiser-syntax--builtin-keywords
+ '("and-let*"
+ "cut"
+ "cute"
+ "define-condition-type"
+ "define-immutable-record-type"
+ "define-record-type"
+ "define-values"
+ "letrec*"
+ "match"
+ "match-lambda"
+ "match-lambda*"
+ "match-let"
+ "match-let*"
+ "match-letrec"
+ "parameterize"
+ "receive"
+ "require-extension"
+ "set!"
+ "unless"
+ "when"
+ "with-input-from-file"
+ "with-output-to-file"))
(defun geiser-syntax--simple-keywords (keywords)
"Return `font-lock-keywords' to highlight scheme KEYWORDS.
@@ -66,7 +82,16 @@ KEYWORDS should be a list of strings."
(when keywords
`((,(format "[[(]%s\\>" (regexp-opt keywords 1)) . 1))))
-(font-lock-add-keywords 'scheme-mode geiser-syntax--keywords)
+(defun geiser-syntax--keywords ()
+ (append
+ (geiser-syntax--simple-keywords geiser-syntax--builtin-keywords)
+ `(("\\[\\(else\\)\\>" . 1)
+ (,(rx "(" (group "define-syntax-rule") eow (* space)
+ (? "(") (? (group (1+ word))))
+ (1 font-lock-keyword-face)
+ (2 font-lock-function-name-face nil t)))))
+
+(font-lock-add-keywords 'scheme-mode (geiser-syntax--keywords))
(geiser-impl--define-caller geiser-syntax--impl-kws keywords ()
"A variable (or thunk returning a value) giving additional,