File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 27
27
; ;; Code:
28
28
29
29
(require 'cl-lib )
30
- (require 'haskell-mode )
30
+ (require 'haskell-compat )
31
31
(require 'font-lock )
32
32
33
33
(defcustom haskell-font-lock-symbols nil
Original file line number Diff line number Diff line change 140
140
(require 'haskell-sort-imports )
141
141
(require 'haskell-string )
142
142
(require 'haskell-indentation )
143
+ (require 'haskell-font-lock )
143
144
144
145
; ; All functions/variables start with `(literate-)haskell-'.
145
146
Original file line number Diff line number Diff line change 7
7
(insert line)
8
8
(insert " \n " )))
9
9
10
+ ; ; Emacs 24.3 has sql-mode that runs without a product and therefore
11
+ ; ; without font lock initially and needs to be extra enabled
12
+ (add-hook 'sql-mode-hook (lambda () (sql-set-product 'ansi )))
10
13
11
14
(defun check-syntax-and-face-match-range (beg end syntax face )
12
15
" Check if all charaters between positions BEG and END have
@@ -424,6 +427,26 @@ if all of its characters have syntax and face. See
424
427
(" Cons_p" t haskell-constructor-face)
425
428
(" Cons_x" t haskell-quasi-quote-face))))
426
429
430
+ (ert-deftest haskell-syntactic-test-quasiquoter-sql-1 ()
431
+ " Embedded SQL statements"
432
+ (check-properties
433
+ '(" sql = [sql| SELECT title FROM books; |]" )
434
+ '((" SELECT" t font-lock-keyword-face )
435
+ (" title" t nil )
436
+ (" FROM" t font-lock-keyword-face )
437
+ (" books" t nil ))))
438
+
439
+ (ert-deftest haskell-syntactic-test-quasiquoter-sql-2 ()
440
+ " Embedded SQL statements"
441
+ :expected-result :failed
442
+ ; ; for now we have this problem that connstructor faces are used,
443
+ ; ; org-mode knows how to get around this problem
444
+ (check-properties
445
+ '(" sql = [sql| SELECT Title FROM Books; |]" )
446
+ '((" Title" t nil )
447
+ (" Books" t nil ))))
448
+
449
+
427
450
(ert-deftest haskell-syntactic-test-special-not-redefined ()
428
451
" QuasiQuote should not conflict with TemplateHaskell"
429
452
(check-properties
You can’t perform that action at this time.
0 commit comments