# HG changeset patch # User Oleksandr Gavenko # Date 1458564278 -7200 # Node ID 86acae5bd220aac26800152943d1ee5b6e40ce68 # Parent 20a4fc071929c3cb899ace216e759107c3cf6d23 gadict-setup-comment-style diff -r 20a4fc071929 -r 86acae5bd220 contrib/gadict.el --- a/contrib/gadict.el Mon Mar 21 13:25:06 2016 +0200 +++ b/contrib/gadict.el Mon Mar 21 14:44:38 2016 +0200 @@ -27,6 +27,14 @@ ("^ +\\(?: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-comment-style () + (set (make-local-variable 'comment-start) "#") + (set (make-local-variable 'comment-continue) nil) + (set (make-local-variable 'comment-end) "") + (set (make-local-variable 'comment-end-skip) nil) + (set (make-local-variable 'comment-multi-line) nil) + (set (make-local-variable 'comment-use-syntax) t) ) + (eval-when-compile (defvar font-lock-beg) (defvar font-lock-end)) @@ -80,6 +88,7 @@ (setq paragraph-separate "\\([ \t\f]*\\|_\\{5,\\}\\)$") (make-local-variable 'paragraph-start) (setq paragraph-start paragraph-separate) + (gadict-setup-comment-style) (add-hook 'font-lock-extend-region-functions 'gadict-font-lock-extend-region t) ) (provide 'gadict)