Make graphviz-dot not insert a newline every semicolon
This commit is contained in:
parent
529445c0b9
commit
d63fb671ab
@ -197,6 +197,21 @@
|
|||||||
(add-hook 'prog-mode-hook
|
(add-hook 'prog-mode-hook
|
||||||
#'(lambda () (setq-local show-trailing-whitespace t))))
|
#'(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)
|
;;;; external packages (required)
|
||||||
(use-package company :ensure
|
(use-package company :ensure
|
||||||
:config
|
:config
|
||||||
|
Loading…
Reference in New Issue
Block a user