Skip to content

Commit

Permalink
Use font-lock-preprocessor-face for CPP directives
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hvr committed Jun 29, 2013
1 parent 2c8a0de commit 0a9580d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 7 additions & 3 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ See also [[https://github.com/haskell/haskell-mode/compare/v13.06...v13.07][deta

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

- Remove deprecated `turn-on-haskell-font-lock` function

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

- Improvements to `haskell-move-nested' module:
- Add support for operating on active regions
Expand Down
9 changes: 5 additions & 4 deletions haskell-font-lock.el
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,10 @@ Returns keywords suitable for `font-lock-keywords'."
(setq keywords
`(;; NOTICE the ordering below is significant
;;
("^<<<<<<< .*$" 0 'font-lock-preprocessor-face t)
("^=======" 0 'font-lock-preprocessor-face t)
("^>>>>>>> .*$" 0 'font-lock-preprocessor-face t)
("^#.*$" 0 'font-lock-warning-face t)
("^<<<<<<< .*$" 0 'font-lock-warning-face t)
("^=======" 0 'font-lock-warning-face t)
("^>>>>>>> .*$" 0 'font-lock-warning-face t)
("^#.*$" 0 'font-lock-preprocessor-face t)
,@(unless haskell-emacs21-features ;Supports nested comments?
;; Expensive.
`((,string-and-char 1 font-lock-string-face)))
Expand Down Expand Up @@ -648,6 +648,7 @@ Invokes `haskell-font-lock-hook' if not nil."

;; Local Variables:
;; byte-compile-warnings: (not cl-functions)
;; tab-width: 8
;; End:

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

0 comments on commit 0a9580d

Please sign in to comment.