134134 " Face with which to fontify literate comments.
135135Set to `default' to avoid fontification of them." )
136136
137- (defconst purescript-emacs21-features (string-match " [[:alpha:]]" " x" )
138- " Non-nil if we have regexp char classes.
139- Assume this means we have other useful features from Emacs 21." )
140-
141137; ; The font lock regular expressions.
142138(defun purescript-font-lock-keywords-create (literate )
143139 " Create fontification definitions for PureScript scripts.
@@ -187,15 +183,6 @@ Returns keywords suitable for `font-lock-keywords'."
187183 " infixr" " instance" " let" " module" " newtype" " of"
188184 " then" " type" " where" " _" ) 'words ))
189185
190- ; ; This unreadable regexp matches strings and character
191- ; ; constants. We need to do this with one regexp to handle
192- ; ; stuff like '"':"'". The regexp is the composition of
193- ; ; "([^"\\ ]|\\ .)*" for strings and '([^\\ ]|\\ .[^']*)' for
194- ; ; characters, allowing for string continuations.
195- ; ; Could probably be improved...
196- (string-and-char
197- (concat " \\ (\\ (\" \\ |" line-prefix " [ \t ]*\\\\\\ )\\ ([^\" \\\\ \n ]\\ |\\\\ .\\ )*\\ (\" \\ |\\\\ [ \t ]*$\\ )\\ |'\\ ([^'\\\\ \n ]\\ |\\\\ .[^'\n ]*\\ )'\\ )" ))
198-
199186 ; ; Top-level declarations
200187 (topdecl-var
201188 (concat line-prefix " \\ (" varid " \\ )\\ s-*"
@@ -222,9 +209,6 @@ Returns keywords suitable for `font-lock-keywords'."
222209 (" ^=======" 0 'font-lock-warning-face t )
223210 (" ^>>>>>>> .*$" 0 'font-lock-warning-face t )
224211 (" ^#.*$" 0 'font-lock-preprocessor-face t )
225- ,@(unless purescript-emacs21-features ; Supports nested comments?
226- ; ; Expensive.
227- `((, string-and-char 1 font-lock-string-face )))
228212
229213 (, reservedid 1 (symbol-value 'purescript-keyword-face ))
230214 (, reservedsym 1 (symbol-value 'purescript-operator-face ))
0 commit comments