Introduce autodefs to replace some settings

+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
This commit is contained in:
Henrik Lissner
2018-06-15 02:58:12 +02:00
parent 6693db48af
commit d8b1e469bc
54 changed files with 329 additions and 248 deletions

View File

@ -30,7 +30,7 @@
(figwheel-sidecar.repl-api/start-figwheel!)
(figwheel-sidecar.repl-api/cljs-repl))")
(set! :popup "^\\*cider-repl" nil '((quit) (select)))
(set-popup-rule! "^\\*cider-repl" nil '((quit) (select)))
(set! :repl 'clojure-mode #'+clojure/repl)
(set! :eval 'clojure-mode #'cider-eval-region)
(set! :lookup 'clojure-mode