lang/faust: minor refactor

This commit is contained in:
Henrik Lissner 2019-10-14 00:44:39 -04:00
parent a792777f52
commit 97d915e64b
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -3,27 +3,23 @@
(use-package! faustine (use-package! faustine
:mode ("\\.dsp\\'" . faustine-mode) :mode ("\\.dsp\\'" . faustine-mode)
:config :config
(set-company-backend! '(faust-mode faustine-mode) '+faust-company-backend) (set-company-backend! '(faust-mode faustine-mode) '+faust-company-backend)
(defadvice! +faust--suppress-ac-warnings-a (orig-fn &rest args) ;; HACK Both `faust-mode' and `faustine-mode' are hardcoded to use
"Silence obnoxious 'You really should install and use auto-complete' warnings ;; auto-complete. This silences the obnoxious 'You really should install and
when starting faust-mode *and* faustine-mode. You really should *not* install ;; use auto-complete' warnings when starting them.
nor use auto-complete." (defvar ac-modes nil)
:around '(faust-mode faustine-mode) (defvar ac-sources nil)
(let (ac-modes ac-sources)
(apply orig-fn args)))
(map! :localleader (map! :localleader
:map faustine-mode-map :map faustine-mode-map
"RET" #'faustine-mdoc
"b" #'faustine-build "b" #'faustine-build
"B" #'faustine-build-all
"c" #'faustine-syntax-check "c" #'faustine-syntax-check
"d" #'faustine-diagram "d" #'faustine-diagram
"D" #'faustine-diagram-all
"h" #'faustine-online-doc "h" #'faustine-online-doc
"RET" #'faustine-mdoc
"o" #'faustine-toggle-output-buffer "o" #'faustine-toggle-output-buffer
"s" #'faustine-source-code "s" #'faustine-source-code
"r" #'faustine-run "r" #'faustine-run))
"S-b" #'faustine-build-all
"S-d" #'faustine-diagram-all
))