Use when instead of if in electric-graphviz-dot-semi

This commit is contained in:
Adam Goldsmith 2018-05-11 00:55:10 -04:00
parent f1aed9c65e
commit a89a9fe37a

View File

@ -220,12 +220,12 @@
"Terminate line and indent next line." "Terminate line and indent next line."
(interactive) (interactive)
(insert ";") (insert ";")
(if (and graphviz-dot-auto-indent-on-semi (when (and graphviz-dot-auto-indent-on-semi
(not (graphviz-dot-comment-or-string-p))) (not (graphviz-dot-comment-or-string-p)))
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
(skip-chars-forward " \t") (skip-chars-forward " \t")
(graphviz-dot-indent-line)) (graphviz-dot-indent-line))
(delete-horizontal-space)))) (delete-horizontal-space))))
(use-package frame (use-package frame