module: add :lang graphviz
Close: #7546 Co-authored-by: nbfalcon <nbfalcon@users.noreply.github.com> Co-authored-by: peterhoeg <peterhoeg@users.noreply.github.com>
This commit is contained in:
parent
fc35b3cf37
commit
f6b7e8ae48
6 changed files with 132 additions and 0 deletions
19
modules/lang/graphviz/autoload.el
Normal file
19
modules/lang/graphviz/autoload.el
Normal file
|
@ -0,0 +1,19 @@
|
|||
;;; lang/graphviz/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(cl-defun +graphviz-formatter (&key _buffer scratch callback &allow-other-keys)
|
||||
"Format graphviz graphs."
|
||||
(with-current-buffer scratch
|
||||
(let ((inhibit-message t)
|
||||
(message-log-max nil))
|
||||
(goto-char (point-min))
|
||||
(graphviz-dot-indent-graph))
|
||||
(funcall callback)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +graphviz/toggle-preview ()
|
||||
"Toggle `graphviz-dot-auto-preview-on-save'."
|
||||
(interactive nil 'graphviz-dot-mode)
|
||||
(if graphviz-dot-auto-preview-on-save
|
||||
(graphviz-turn-off-live-preview)
|
||||
(graphviz-turn-on-live-preview)))
|
Loading…
Add table
Add a link
Reference in a new issue