@@ -86,56 +86,47 @@ This is the case if the \".\" is part of a \"forall <tvar> . <type>\"."
86
86
(line-beginning-position ) t )))
87
87
88
88
(defface haskell-keyword-face
89
- '((t :inherit font-lock-keyword-face ))
89
+ '((t :inherit ' font-lock-keyword-face ))
90
90
" Face used to highlight Haskell keywords."
91
91
:group 'haskell )
92
92
93
93
(defface haskell-constructor-face
94
- '((t :inherit font-lock-type-face ))
94
+ '((t :inherit ' font-lock-type-face ))
95
95
" Face used to highlight Haskell constructors."
96
96
:group 'haskell )
97
97
98
98
; ; This used to be `font-lock-variable-name-face' but it doesn't result in
99
99
; ; a highlighting that's consistent with other modes (it's mostly used
100
100
; ; for function defintions).
101
101
(defface haskell-definition-face
102
- '((t :inherit font-lock-function-name-face ))
102
+ '((t :inherit ' font-lock-function-name-face ))
103
103
" Face used to highlight Haskell definitions."
104
104
:group 'haskell )
105
105
106
106
; ; This is probably just wrong, but it used to use
107
107
; ; `font-lock-function-name-face' with a result that was not consistent with
108
108
; ; other major modes, so I just exchanged with `haskell-definition-face' .
109
109
(defface haskell-operator-face
110
- '((t :inherit font-lock-variable-name-face ))
110
+ '((t :inherit ' font-lock-variable-name-face ))
111
111
" Face used to highlight Haskell operators."
112
112
:group 'haskell )
113
113
114
114
(defface haskell-pragma-face
115
- '((t :inherit font-lock-preprocessor-face ))
115
+ '((t :inherit ' font-lock-preprocessor-face ))
116
116
" Face used to highlight Haskell pragmas."
117
117
:group 'haskell )
118
118
119
119
(defface haskell-default-face
120
- '((t :inherit default ))
120
+ '((t :inherit ' default ))
121
121
" Face used to highlight ordinary Haskell code."
122
122
:group 'haskell )
123
123
124
124
(defface haskell-literate-comment-face
125
- '((t :inherit font-lock-doc-face ))
125
+ '((t :inherit ' font-lock-doc-face ))
126
126
" Face with which to fontify literate comments.
127
127
Inherit from `default' to avoid fontification of them."
128
128
:group 'haskell )
129
129
130
- ; ; These variables exist only for backward compatibility.
131
- (defvar haskell-keyword-face 'haskell-keyword-face )
132
- (defvar haskell-constructor-face 'haskell-constructor-face )
133
- (defvar haskell-definition-face 'haskell-definition-face )
134
- (defvar haskell-operator-face 'haskell-operator-face )
135
- (defvar haskell-pragma-face 'haskell-pragma-face )
136
- (defvar haskell-default-face 'haskell-default-face )
137
- (defvar haskell-literate-comment-face 'haskell-literate-comment-face )
138
-
139
130
(defun haskell-font-lock-compose-symbol (alist )
140
131
" Compose a sequence of ascii chars into a symbol.
141
132
Regexp match data 0 points to the chars."
@@ -234,55 +225,55 @@ Returns keywords suitable for `font-lock-keywords'."
234
225
235
226
,@(haskell-font-lock-symbols-keywords)
236
227
237
- (, reservedid 1 haskell-keyword-face)
228
+ (, reservedid 1 ' haskell-keyword-face )
238
229
239
230
; ; Special case for `as' , `hiding' , `safe' and `qualified' , which are
240
231
; ; keywords in import statements but are not otherwise reserved.
241
232
(" \\ <import[ \t ]+\\ (?:\\ (safe\\ >\\ )[ \t ]*\\ )?\\ (?:\\ (qualified\\ >\\ )[ \t ]*\\ )?\\ (?:\" [^\" ]*\" [\t ]*\\ )?[^ \t\n ()]+[ \t ]*\\ (?:\\ (\\ <as\\ >\\ )[ \t ]*[^ \t\n ()]+[ \t ]*\\ )?\\ (\\ <hiding\\ >\\ )?"
242
- (1 haskell-keyword-face nil lax)
243
- (2 haskell-keyword-face nil lax)
244
- (3 haskell-keyword-face nil lax)
245
- (4 haskell-keyword-face nil lax))
233
+ (1 ' haskell-keyword-face nil lax)
234
+ (2 ' haskell-keyword-face nil lax)
235
+ (3 ' haskell-keyword-face nil lax)
236
+ (4 ' haskell-keyword-face nil lax))
246
237
247
238
; ; Special case for `foreign import'
248
239
; ; keywords in foreign import statements but are not otherwise reserved.
249
240
(" \\ <\\ (foreign\\ )[ \t ]+\\ (import\\ )[ \t ]+\\ (?:\\ (ccall\\ |stdcall\\ |cplusplus\\ |jvm\\ |dotnet\\ )[ \t ]+\\ )?\\ (?:\\ (safe\\ |unsafe\\ |interruptible\\ )[ \t ]+\\ )?"
250
- (1 haskell-keyword-face nil lax)
251
- (2 haskell-keyword-face nil lax)
252
- (3 haskell-keyword-face nil lax)
253
- (4 haskell-keyword-face nil lax))
241
+ (1 ' haskell-keyword-face nil lax)
242
+ (2 ' haskell-keyword-face nil lax)
243
+ (3 ' haskell-keyword-face nil lax)
244
+ (4 ' haskell-keyword-face nil lax))
254
245
255
246
; ; Special case for `foreign export'
256
247
; ; keywords in foreign export statements but are not otherwise reserved.
257
248
(" \\ <\\ (foreign\\ )[ \t ]+\\ (export\\ )[ \t ]+\\ (?:\\ (ccall\\ |stdcall\\ |cplusplus\\ |jvm\\ |dotnet\\ )[ \t ]+\\ )?"
258
- (1 haskell-keyword-face nil lax)
259
- (2 haskell-keyword-face nil lax)
260
- (3 haskell-keyword-face nil lax))
249
+ (1 ' haskell-keyword-face nil lax)
250
+ (2 ' haskell-keyword-face nil lax)
251
+ (3 ' haskell-keyword-face nil lax))
261
252
262
253
; ; Toplevel Declarations.
263
254
; ; Place them *before* generic id-and-op highlighting.
264
- (, topdecl-var (1 haskell-definition-face))
265
- (, topdecl-var2 (2 haskell-definition-face))
266
- (, topdecl-bangpat (1 haskell-definition-face))
267
- (, topdecl-sym (2 haskell-definition-face))
268
- (, topdecl-sym2 (1 haskell-definition-face))
255
+ (, topdecl-var (1 ' haskell-definition-face ))
256
+ (, topdecl-var2 (2 ' haskell-definition-face ))
257
+ (, topdecl-bangpat (1 ' haskell-definition-face ))
258
+ (, topdecl-sym (2 ' haskell-definition-face ))
259
+ (, topdecl-sym2 (1 ' haskell-definition-face ))
269
260
270
261
; ; These four are debatable...
271
- (" (\\ (,*\\ |->\\ ))" 0 haskell-constructor-face)
272
- (" \\ [\\ ]" 0 haskell-constructor-face)
262
+ (" (\\ (,*\\ |->\\ ))" 0 ' haskell-constructor-face )
263
+ (" \\ [\\ ]" 0 ' haskell-constructor-face )
273
264
274
- (,(concat " `" varid " `" ) 0 haskell-operator-face)
275
- (,(concat " `" conid " `" ) 0 haskell-operator-face)
276
- (,(concat " `" qvarid " `" ) 0 haskell-operator-face)
277
- (,(concat " `" qconid " `" ) 0 haskell-operator-face)
278
- (, qvarid 0 haskell-default-face)
279
- (, qconid 0 haskell-constructor-face)
265
+ (,(concat " `" varid " `" ) 0 ' haskell-operator-face )
266
+ (,(concat " `" conid " `" ) 0 ' haskell-operator-face )
267
+ (,(concat " `" qvarid " `" ) 0 ' haskell-operator-face )
268
+ (,(concat " `" qconid " `" ) 0 ' haskell-operator-face )
269
+ (, qvarid 0 ' haskell-default-face )
270
+ (, qconid 0 ' haskell-constructor-face )
280
271
281
- (, conid 0 haskell-constructor-face)
272
+ (, conid 0 ' haskell-constructor-face )
282
273
283
274
(, sym 0 (if (eq (char-after (match-beginning 0 )) ?: )
284
- haskell-constructor-face
285
- haskell-operator-face))))
275
+ ' haskell-constructor-face
276
+ ' haskell-operator-face ))))
286
277
keywords))
287
278
288
279
(defvar haskell-font-lock-latex-cache-pos nil
@@ -382,12 +373,12 @@ that should be commented under LaTeX-style literate scripts."
382
373
(defun haskell-syntactic-face-function (state )
383
374
" `font-lock-syntactic-face-function' for Haskell."
384
375
(cond
385
- ((nth 3 state) font-lock-string-face ) ; as normal
376
+ ((nth 3 state) ' font-lock-string-face ) ; as normal
386
377
; ; Else comment. If it's from syntax table, use default face.
387
378
((or (eq 'syntax-table (nth 7 state))
388
379
(and (eq haskell-literate 'bird )
389
380
(memq (char-before (nth 8 state)) '(nil ?\n ))))
390
- haskell-literate-comment-face)
381
+ ' haskell-literate-comment-face )
391
382
; ; Detect pragmas. A pragma is enclosed in special comment
392
383
; ; delimeters {-# .. #-}.
393
384
((save-excursion
@@ -396,7 +387,7 @@ that should be commented under LaTeX-style literate scripts."
396
387
(forward-comment 1 )
397
388
(goto-char (- (point ) 3 ))
398
389
(looking-at-p " #-}" )))
399
- haskell-pragma-face)
390
+ ' haskell-pragma-face )
400
391
; ; Haddock comment start with either "-- [|^*$]" or "{- ?[|^*$]"
401
392
; ; (note space optional for nested comments and mandatory for
402
393
; ; double dash comments).
@@ -415,12 +406,12 @@ that should be commented under LaTeX-style literate scripts."
415
406
(and (looking-at-p " --" ) ; are we at double dash comment
416
407
(forward-line -1 ) ; this is nil on first line
417
408
(eq (get-text-property (line-end-position ) 'face )
418
- font-lock-doc-face ) ; is a doc face
409
+ ' font-lock-doc-face ) ; is a doc face
419
410
(forward-line )
420
411
(skip-syntax-forward " -" ) ; see if there is only whitespace
421
412
(eq (point ) (nth 8 state))))) ; we are back in position
422
- font-lock-doc-face )
423
- (t font-lock-comment-face )))
413
+ ' font-lock-doc-face )
414
+ (t ' font-lock-comment-face )))
424
415
425
416
(defconst haskell-font-lock-keywords
426
417
(haskell-font-lock-keywords-create nil )
0 commit comments