Skip to content

Commit 6e2779e

Browse files
committed
Merge pull request #1252 from gracjan/pr-use-default-face-in-qq
Use default face in quasi quotes
2 parents fd52de0 + e9dfe28 commit 6e2779e

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

haskell-font-lock.el

+6-2
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,12 @@ like ::, class, instance, data, newtype, type."
439439
(while (setq next (next-single-property-change pos 'face))
440440
(put-text-property
441441
(+ start (1- pos)) (1- (+ start next)) 'face
442-
(get-text-property pos 'face) org-buffer)
443-
(setq pos next)))
442+
(or (get-text-property pos 'face) 'default) org-buffer)
443+
(setq pos next))
444+
(unless (equal pos (point-max))
445+
(put-text-property
446+
(+ start (1- pos)) (1- (+ start (point-max))) 'face
447+
'default org-buffer)))
444448
(add-text-properties
445449
start end
446450
'(font-lock-fontified t fontified t font-lock-multiline t))

tests/haskell-font-lock-tests.el

+4-5
Original file line numberDiff line numberDiff line change
@@ -371,19 +371,18 @@
371371
(check-properties
372372
'("sql = [sql| SELECT title FROM books; |]")
373373
'(("SELECT" t font-lock-keyword-face)
374-
("title" t nil)
374+
("title" t default)
375375
("FROM" t font-lock-keyword-face)
376-
("books" t nil))))
376+
("books" t default))))
377377

378378
(ert-deftest haskell-syntactic-test-quasiquoter-sql-2 ()
379379
"Embedded SQL statements"
380-
:expected-result :failed
381380
;; for now we have this problem that connstructor faces are used,
382381
;; org-mode knows how to get around this problem
383382
(check-properties
384383
'("sql = [sql| SELECT Title FROM Books; |]")
385-
'(("Title" t nil)
386-
("Books" t nil))))
384+
'(("Title" t default)
385+
("Books" t default))))
387386

388387

389388
(ert-deftest haskell-syntactic-test-special-not-redefined ()

0 commit comments

Comments
 (0)