Skip to content

Commit 0a9580d

Browse files
committed
Use font-lock-preprocessor-face for CPP directives
This also changes to use `font-lock-warning-face` for Git's merge conflicts annotations (see also a469367). Note: Users will most likely want to customize `font-lock-preprocessor-face` now, as the current default looks just like `font-lock-function-name-face`. This hopefully resolves #154.
1 parent 2c8a0de commit 0a9580d

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

Diff for: NEWS

+7-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ See also [[https://github.com/haskell/haskell-mode/compare/v13.06...v13.07][deta
2020

2121
- Remove deprecated `haskell-{hugs,ghci}' modules
2222

23-
- Remove deprecated `turn-on-haskell-font-lock` function
24-
25-
- Improve font-locking of type-signatures in presence of newlines
23+
- Font-locking changes:
24+
- Remove deprecated `turn-on-haskell-font-lock` function
25+
- Improve font-locking of type-signatures in presence of newlines
26+
- Use `font-lock-preprocessor-face' instead of the previously used
27+
`font-lock-warning-face` for CPP directives
28+
- Use `font-lock-warning-face` instead of the previously used
29+
`font-lock-preprocessor-face` for Git merge conflict annotations.
2630

2731
- Improvements to `haskell-move-nested' module:
2832
- Add support for operating on active regions

Diff for: haskell-font-lock.el

+5-4
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,10 @@ Returns keywords suitable for `font-lock-keywords'."
328328
(setq keywords
329329
`(;; NOTICE the ordering below is significant
330330
;;
331-
("^<<<<<<< .*$" 0 'font-lock-preprocessor-face t)
332-
("^=======" 0 'font-lock-preprocessor-face t)
333-
("^>>>>>>> .*$" 0 'font-lock-preprocessor-face t)
334-
("^#.*$" 0 'font-lock-warning-face t)
331+
("^<<<<<<< .*$" 0 'font-lock-warning-face t)
332+
("^=======" 0 'font-lock-warning-face t)
333+
("^>>>>>>> .*$" 0 'font-lock-warning-face t)
334+
("^#.*$" 0 'font-lock-preprocessor-face t)
335335
,@(unless haskell-emacs21-features ;Supports nested comments?
336336
;; Expensive.
337337
`((,string-and-char 1 font-lock-string-face)))
@@ -648,6 +648,7 @@ Invokes `haskell-font-lock-hook' if not nil."
648648

649649
;; Local Variables:
650650
;; byte-compile-warnings: (not cl-functions)
651+
;; tab-width: 8
651652
;; End:
652653

653654
;;; haskell-font-lock.el ends here

0 commit comments

Comments
 (0)