134
134
" Face with which to fontify literate comments.
135
135
Set to `default' to avoid fontification of them." )
136
136
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
-
141
137
; ; The font lock regular expressions.
142
138
(defun purescript-font-lock-keywords-create (literate )
143
139
" Create fontification definitions for PureScript scripts.
@@ -187,15 +183,6 @@ Returns keywords suitable for `font-lock-keywords'."
187
183
" infixr" " instance" " let" " module" " newtype" " of"
188
184
" then" " type" " where" " _" ) 'words ))
189
185
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
-
199
186
; ; Top-level declarations
200
187
(topdecl-var
201
188
(concat line-prefix " \\ (" varid " \\ )\\ s-*"
@@ -222,9 +209,6 @@ Returns keywords suitable for `font-lock-keywords'."
222
209
(" ^=======" 0 'font-lock-warning-face t )
223
210
(" ^>>>>>>> .*$" 0 'font-lock-warning-face t )
224
211
(" ^#.*$" 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 )))
228
212
229
213
(, reservedid 1 (symbol-value 'purescript-keyword-face ))
230
214
(, reservedsym 1 (symbol-value 'purescript-operator-face ))
0 commit comments