--- a/contrib/gadict.el Mon Mar 21 22:55:43 2016 +0200
+++ b/contrib/gadict.el Mon Mar 21 22:57:15 2016 +0200
@@ -27,6 +27,13 @@
("^ +\\(?:v1\\|v2\\|v3\\|s\\|pl\\|male\\|female\\)$" . font-lock-doc-face)
("^\\(?:n\\|v\\|phr\\.v\\|adj\\|adv\\|pron\\|prep\\|num\\|conj\\|int\\)$" . font-lock-type-face) ))
+(defun gadict-setup-fontlock ()
+ (setq font-lock-defaults
+ '(gadict-font-lock-keywords
+ t nil nil nil
+ (font-lock-multiline . t) ))
+ (add-hook 'font-lock-extend-region-functions 'gadict-font-lock-extend-region t) )
+
(defun gadict-setup-comment ()
(set (make-local-variable 'comment-start) "#")
(set (make-local-variable 'comment-continue) nil)
@@ -86,17 +93,12 @@
;;;###autoload
(define-derived-mode gadict-mode fundamental-mode "gadict"
"Derived mode for editing gadict dictionary source files."
- (setq font-lock-defaults
- '(gadict-font-lock-keywords
- t nil nil nil
- (font-lock-multiline . t)
- ))
+ (gadict-setup-fontlock)
(gadict-setup-keymap)
(gadict-setup-syntax)
(gadict-setup-paragraph)
(gadict-setup-page)
- (gadict-setup-comment)
- (add-hook 'font-lock-extend-region-functions 'gadict-font-lock-extend-region t) )
+ (gadict-setup-comment) )
(provide 'gadict)