From 1e7e0e9876ae1bdb3ed8e133ab47fc03252d036d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sat, 2 Jul 2016 03:28:19 +0200 Subject: [PATCH] FUEL: better symbol-capturing regexp and support for X-FUNCTION --- misc/fuel/factor-mode.el | 8 ++++++-- misc/fuel/strange-syntax.factor | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index 95ec91bd0d..c810d0d293 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -178,7 +178,7 @@ these lines in your .emacs: ;;; Regexps galore: ;; Utility regexp used by other regexps to match a Factor symbol name -(setq-local symbol-nc "\\(?:\\sw\\|\\s_\\|\\s(\\|\\s)\\|\\s\\\\)+") +(setq-local symbol-nc "\\(?:\\sw\\|\\s_\\|\"\\|\\s(\\|\\s)\\|\\s\\\\)+") (setq-local symbol (format "\\(%s\\)" symbol-nc)) (setq-local ws+ "[ \n\t]+") (setq-local symbols-to-semicolon "\\([^;\t]*\\)\\(;\\)") @@ -390,7 +390,11 @@ these lines in your .emacs: (concat (syntax-begin '("PREDICATE")) ws+ symbol ws+ "\\(<\\)" ws+ symbol)) (defconst factor-alien-function-regex - (concat (syntax-begin '("GL-FUNCTION" "FUNCTION" "GL-CALLBACK" "CALLBACK")) + (concat (syntax-begin '("CALLBACK" + "FUNCTION" + "GL-CALLBACK" + "GL-FUNCTION" + "X-FUNCTION")) ws+ symbol ws+ symbol ws+)) diff --git a/misc/fuel/strange-syntax.factor b/misc/fuel/strange-syntax.factor index 7a13ffd681..40e608f92b 100644 --- a/misc/fuel/strange-syntax.factor +++ b/misc/fuel/strange-syntax.factor @@ -51,7 +51,9 @@ C-TYPE: cairo_snurface_t ! ! CHAR : stuff-with-chars ( -- K \n ) CHAR: K - CHAR: \n ; + CHAR: \n + CHAR: \" ! <- \" should be highlighted + drop ; ! ! MAIN : majn ( -- ) ;