FUEL: fix highlighting of strings escaping quote characters

(modify-syntax-entry ?\\ "_" table) was wrong, instead a bigger regexp
is needed.
char-rename
Björn Lindqvist 2016-06-30 01:00:42 +02:00
parent d9f17317e3
commit e8a62460aa
2 changed files with 7 additions and 2 deletions

View 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)

View 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 ) ;