From 40142cb1f3f00ad95785fca92e44ecbc91c12185 Mon Sep 17 00:00:00 2001 From: Gracjan Polak Date: Sun, 18 Jan 2015 18:37:30 +0100 Subject: [PATCH] Add PackageImports syntax to font-lock. This commit correctly highlight 'as' and 'hiding' as keywords in statement: import "package" A.B.C as C hiding (f) --- haskell-font-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell-font-lock.el b/haskell-font-lock.el index 373b3c0ed..37a42756a 100644 --- a/haskell-font-lock.el +++ b/haskell-font-lock.el @@ -392,7 +392,7 @@ Returns keywords suitable for `font-lock-keywords'." (,reservedsym 1 haskell-operator-face) ;; Special case for `as', `hiding', `safe' and `qualified', which are ;; keywords in import statements but are not otherwise reserved. - ("\\\\)[ \t]*\\)?\\(?:\\(qualified\\>\\)[ \t]*\\)?[^ \t\n()]+[ \t]*\\(?:\\(\\\\)[ \t]*[^ \t\n()]+[ \t]*\\)?\\(\\\\)?" + ("\\\\)[ \t]*\\)?\\(?:\\(qualified\\>\\)[ \t]*\\)?\\(?:\"[^\"]*\"[\t ]*\\)?[^ \t\n()]+[ \t]*\\(?:\\(\\\\)[ \t]*[^ \t\n()]+[ \t]*\\)?\\(\\\\)?" (1 haskell-keyword-face nil lax) (2 haskell-keyword-face nil lax) (3 haskell-keyword-face nil lax)