From c6523fd408eff71add58383e8d4a4dc8489ff6ab Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sun, 20 Sep 2026 21:38:47 +0700 Subject: [PATCH] The package half of a qualified name is drawn as a type --- emacs/flan-mode.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emacs/flan-mode.el b/emacs/flan-mode.el index 6d2afa9..f6c7379 100644 --- a/emacs/flan-mode.el +++ b/emacs/flan-mode.el @@ -159,6 +159,11 @@ forms that cannot be used.") ;; colon-to-dot change left behind: the keyword rule above used to cover ;; them and no longer does, because the colon belongs to keywords now. ("\\_<\\.\\(?:\\sw\\|\\s_\\)+" . font-lock-constant-face) + ;; The package half of a qualified name — the `rl/' of `rl/draw-text'. + ;; Drawn as a type the way clojure-mode draws a namespace, so the eye can + ;; split the package from the name without reading either. The leading + ;; letter keeps `:foo/bar' keywords and a bare `/' out of it. + ("\\_<\\([a-zA-Z][a-zA-Z0-9!?*+=<>._-]*/\\)" 1 font-lock-type-face) ;; The machine types, which are ordinary symbols but never anything else. ("\\_<\\(?:[iu]\\(?:8\\|16\\|32\\|64\\)\\|f\\(?:32\\|64\\)\\|bool\\|string\\|Unit\\|Never\\|Ptr\\|Option\\)\\_>" . font-lock-type-face)