branch: elpa/d-mode
commit e81e5f7d1e35fcafd3180cf1fded2a5eae955d69
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>
Register our syntax-propertize-function before calling c-common-init
This fixes backtick fontification when initially opening a buffer in
Emacs 26 (#21).
---
d-mode.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index f08e3ef..9724631 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
;; Maintainer: Russel Winder <[email protected]>
;; Vladimir Panteleev <[email protected]>
;; Created: March 2007
-;; Version: 201610111121
+;; Version: 201610111435
;; Keywords: D programming language emacs cc-mode
;;;; NB Version number is date and time yyyymmddhhMM UTC.
@@ -592,11 +592,7 @@ Key bindings:
(c-init-language-vars d-mode)
(when (fboundp 'c-make-noise-macro-regexps)
(c-make-noise-macro-regexps))
- (c-common-init 'd-mode)
- (easy-menu-add d-menu)
- (c-run-mode-hooks 'c-mode-common-hook 'd-mode-hook)
- (c-update-modeline)
- (cc-imenu-init d-imenu-generic-expression)
+
;; Generate a function that applies D-specific syntax properties.
;; Concretely, inside back-quoted string literals the backslash
;; character '\' is treated as a punctuation symbol. See help for
@@ -617,7 +613,13 @@ Key bindings:
(zero-or-more
(not (any "`\\"))))))
"`")
- (1 "."))))))
+ (1 ".")))))
+
+ (c-common-init 'd-mode)
+ (easy-menu-add d-menu)
+ (c-run-mode-hooks 'c-mode-common-hook 'd-mode-hook)
+ (c-update-modeline)
+ (cc-imenu-init d-imenu-generic-expression))
;;----------------------------------------------------------------------------
;; "Hideous hacks" to support appropriate font-lock behaviour.