branch: elpa/d-mode
commit 46a9ad2d90270b8017a4ef18ac24a6111c32f91e
Merge: 5ef5f43 4214c49
Author: Russel Winder <[email protected]>
Commit: Russel Winder <[email protected]>
Merge pull request #12 from finalpatch/master
Various changes to the new code for handling font-lock highlighting, plus a
couple of regression fixes.
---
d-mode.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index f629df2..d8c63ca 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -373,7 +373,7 @@ operators."
(concat
"^\\s-*"
"\\(?:[_a-z@]+\\s-+\\)*" ; qualifiers
- "\\([][_a-zA-Z0-9.!]+\\)\\s-+" ; type
+ "\\([][_a-zA-Z0-9.*!]+\\)\\s-+" ; type
"\\([_a-zA-Z0-9]+\\)\\s-*" ; function name
"\\(?:([^)]*)\\s-*\\)?" ; type arguments
"([^)]*)\\s-*" ; arguments
@@ -441,12 +441,13 @@ Key bindings:
(font-lock-add-keywords
'd-mode
'(("\\<\\(auto\\|immutable\\)\\>" 1 font-lock-keyword-face)
- ("^[ \t]*\\(?:[_a-zA-Z0-9]+[ \t\n]+\\)*\\([_a-zA-Z0-9]+\\)[
\t\n]+\\([_a-zA-Z0-9]+\\)[ \t\n]*;"
+ ("^[ \t]*\\(?:[_a-zA-Z0-9]+[ \t\n]+\\)*\\([_a-zA-Z0-9.!]+\\)[][* ]*[
\t\n]+\\([_a-zA-Z0-9]+\\)[ \t\n]*;"
(1 font-lock-type-face)
(2 font-lock-variable-name-face))
- ("^[ \t]*\\(?:[_a-zA-Z0-9]+[ \t\n]+\\)*\\([_a-zA-Z0-9]+\\)[
\t\n]+\\([_a-zA-Z0-9]+\\)[ \t\n]*("
+ ("^[ \t]*\\(?:[_a-zA-Z0-9]+[ \t\n]+\\)*\\([_a-zA-Z0-9.!]+\\)[][* ]*[
\t\n]+\\([_a-zA-Z0-9]+\\)[ \t\n]*("
(1 font-lock-type-face)
- (2 font-lock-function-name-face))))
+ (2 font-lock-function-name-face)))
+ t)
(provide 'd-mode)