]> gitweb.factorcode.org Git - factor.git/commitdiff
FUEL: fix highlighting of strings escaping quote characters
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 29 Jun 2016 23:00:42 +0000 (01:00 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 29 Jun 2016 23:00:42 +0000 (01:00 +0200)
(modify-syntax-entry ?\\ "_" table) was wrong, instead a bigger regexp
is needed.

misc/fuel/factor-mode.el
misc/fuel/strange-syntax.factor

index 7b0f2939a75ddd3ba9c17624aa448aabcb0e83eb..3610afe2d22bf13e92031263241558ff7726bbd4 100644 (file)
@@ -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)
index 98b59addad0b7cbf6aaa6484c6f140fbb17fc1e1..c527c49b1f32382bd761a4a7efd11a15e43a2541 100644 (file)
@@ -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 ) ;