From e8a62460aa4b1c500a8232837beafaba80c0a43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Thu, 30 Jun 2016 01:00:42 +0200 Subject: [PATCH] FUEL: fix highlighting of strings escaping quote characters (modify-syntax-entry ?\\ "_" table) was wrong, instead a bigger regexp is needed. --- misc/fuel/factor-mode.el | 3 +-- misc/fuel/strange-syntax.factor | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index 7b0f2939a7..3610afe2d2 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -183,7 +183,7 @@ these lines in your .emacs: ;;; Regexps galore: ;; Utility regexp used by other regexps to match a Factor symbol name -(setq-local symbol "\\(\\(?:\\sw\\|\\s_\\|\\s(\\|\\s)\\)+\\)") +(setq-local symbol "\\(\\(?:\\sw\\|\\s_\\|\\s(\\|\\s)\\|\\s\\\\)+\\)") (setq-local ws+ "[ \n\t]+") (setq-local symbols-to-semicolon "\\([^;\t]*\\)\\(;\\)") @@ -872,7 +872,6 @@ With prefix, non-existing files will be created." (modify-syntax-entry ?# "_" table) (modify-syntax-entry ?! "_" table) (modify-syntax-entry ?\n "> " table) - (modify-syntax-entry ?\\ "_" table) (modify-syntax-entry ?$ "_" table) (modify-syntax-entry ?@ "_" table) (modify-syntax-entry ?? "_" table) diff --git a/misc/fuel/strange-syntax.factor b/misc/fuel/strange-syntax.factor index 98b59addad..c527c49b1f 100644 --- a/misc/fuel/strange-syntax.factor +++ b/misc/fuel/strange-syntax.factor @@ -12,6 +12,10 @@ TUPLE: a-tuple slot1 slot2 { slot3 integer } ; USING: tools.test ; + +! ! Strings +"containing \"escapes" drop + ! ! Symbol names ! All slashes are symbol constituents. @@ -19,6 +23,8 @@ TUPLE: a-tuple slot1 slot2 { slot3 integer } ; : slash\hack ( -- y ) 20 ; +TUPLE: oh\no ; + ! As are quotes : don't-do-that ( x -- y ) ;