Make graphviz-dot not insert a newline every semicolon

This commit is contained in:
Adam Goldsmith 2018-01-16 20:46:39 -05:00
parent 529445c0b9
commit d63fb671ab

View File

@ -197,6 +197,21 @@
(add-hook 'prog-mode-hook
#'(lambda () (setq-local show-trailing-whitespace t))))
(use-package graphviz-dot-mode
:config
; don't auto-newline on semicolon
(defun electric-graphviz-dot-semi ()
"Terminate line and indent next line."
(interactive)
(insert ";")
(if (and graphviz-dot-auto-indent-on-semi
(not (graphviz-dot-comment-or-string-p)))
(save-excursion
(beginning-of-line)
(skip-chars-forward " \t")
(graphviz-dot-indent-line))
(delete-horizontal-space))))
;;;; external packages (required)
(use-package company :ensure
:config