Skip to content

Commit

Permalink
font-lock: Allow prefix syntax in def* identifiers
Browse files Browse the repository at this point in the history
Adjacent to issue #699: Font-lock identifiers like "pt@x".
  • Loading branch information
greghendershott committed Feb 22, 2024
1 parent 9e8e605 commit 752b8b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions racket-font-lock.el
Expand Up @@ -190,7 +190,9 @@
(,(rx (syntax open-parenthesis)
"def" (0+ (or (syntax word) (syntax symbol) (syntax punctuation)))
(1+ space)
(group (1+ (or (syntax word) (syntax symbol) (syntax punctuation)))))
(group (1+ (or (syntax word) (syntax symbol) (syntax punctuation)
;; allow e.g. @ in identifier name
(syntax expression-prefix)))))
1 font-lock-variable-name-face)
(,(rx (syntax open-parenthesis)
(or "define-syntaxes"
Expand All @@ -207,7 +209,9 @@
"def" (0+ (or (syntax word) (syntax symbol) (syntax punctuation)))
(1+ space)
(1+ (syntax open-parenthesis)) ;1+ b/c curried define
(group (1+ (or (syntax word) (syntax symbol) (syntax punctuation)))))
(group (1+ (or (syntax word) (syntax symbol) (syntax punctuation)
;; allow e.g. @ in identifier name
(syntax expression-prefix)))))
1 font-lock-function-name-face)

;; let identifiers
Expand Down

0 comments on commit 752b8b6

Please sign in to comment.