From 54ca5d09076ea1ad29076075abe30a32594e8c5f Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Thu, 6 Jun 2013 03:55:42 +0200 Subject: Racket: correct font lock for define/match We could probably generalize to more function definition forms, but this is a start. --- elisp/geiser-racket.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el index 0b4f009..b372eb5 100644 --- a/elisp/geiser-racket.el +++ b/elisp/geiser-racket.el @@ -253,9 +253,15 @@ using start-geiser, a procedure in the geiser/server module." ;;; Keywords and syntax +(setq geiser-racket-font-lock-forms + '(("^#lang\\>" . 0) + ("\\[\\(else\\)\\>" . 1) + ("(\\(define/match\\) +\\(\\w+\\)+\\b" + (1 font-lock-keyword-face) + (2 font-lock-function-name-face)))) + (defun geiser-racket--keywords () - (append '(("^#lang\\>" . 0) - ("\\[\\(else\\)\\>" . 1)) + (append geiser-racket-font-lock-forms (when geiser-racket-extra-keywords `((,(format "[[(]%s\\>" (regexp-opt geiser-racket-extra-keywords 1)) . 1))))) -- cgit v1.2.3