aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaclav Haisman <vhaisman@gmail.com>2017-11-03 01:16:26 +0100
committerVaclav Haisman <vhaisman@gmail.com>2017-11-03 01:16:26 +0100
commit916a80ea7685262bc4fda2565deacdcb1c6e623c (patch)
treeaf33f6b0f2bb918d856de8686fbc2187c73e5ac0
parent3eaa6ff329b079387d70449a8236d1b83b95e3bf (diff)
downloadpandoc-916a80ea7685262bc4fda2565deacdcb1c6e623c.tar.gz
pandoc-template-mode.el: Improve.
Avoid highlighting of "strings" by deriving from `text-mode-syntax-table`. This fixes missing highlighting in default.html5 tag attributes. Define comment starting and ending sequences to allow use of M-q (auto-fill) on comments.
-rw-r--r--tools/pandoc-template-mode.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/pandoc-template-mode.el b/tools/pandoc-template-mode.el
index c34a8dbfd..c0f1c6e39 100644
--- a/tools/pandoc-template-mode.el
+++ b/tools/pandoc-template-mode.el
@@ -52,9 +52,13 @@
;;;###autoload
(define-derived-mode pandoc-template-mode fundamental-mode "Pandoc-Template"
"A major mode for editing Pandoc-Template files."
- :syntax-table nil
+ :syntax-table text-mode-syntax-table
(setq-local font-lock-defaults
- '(pandoc-template-font-lock-keywords)))
+ '(pandoc-template-font-lock-keywords))
+ (setq-local comment-start "$--")
+ (setq-local comment-start-skip "\\$--[ \t]*")
+ (setq-local comment-end "")
+ (setq-local comment-end-skip "[ \t]*$"))
(provide 'pandoc-template-mode)
;;; pandoc-template.el ends here