ui/window-select: use use-package :when/:unless instead of cond

Appease the byte-compiler.
This commit is contained in:
Henrik Lissner 2018-01-05 13:16:42 -05:00
parent dd7a26352b
commit fab6fb1270
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -1,8 +1,7 @@
;;; ui/window-select/config.el -*- lexical-binding: t; -*- ;;; ui/window-select/config.el -*- lexical-binding: t; -*-
(cond
((featurep! +switch-window)
(def-package! switch-window (def-package! switch-window
:when (featurep! +switch-window)
:commands (switch-window switch-window-then-maximize switch-window-then-split-below :commands (switch-window switch-window-then-maximize switch-window-then-split-below
switch-window-then-split-right switch-window-then-delete switch-window-then-split-right switch-window-then-delete
switch-window-then-swap-buffer) switch-window-then-swap-buffer)
@ -10,10 +9,11 @@
(define-key global-map [remap other-window] #'switch-window) (define-key global-map [remap other-window] #'switch-window)
:config :config
(setq switch-window-shortcut-style 'qwerty (setq switch-window-shortcut-style 'qwerty
switch-window-qwerty-shortcuts '("a" "s" "d" "f" "g" "h" "j" "k" "l")))) switch-window-qwerty-shortcuts '("a" "s" "d" "f" "g" "h" "j" "k" "l")))
((or (featurep! +ace-window) t) ; default to ace-window
(def-package! ace-window (def-package! ace-window
:unless (featurep! +switch-window)
:commands (ace-window ace-swap-window ace-delete-window :commands (ace-window ace-swap-window ace-delete-window
ace-select-window ace-delete-other-windows) ace-select-window ace-delete-other-windows)
:init :init
@ -21,4 +21,4 @@
:config :config
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l) (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
aw-scope 'frame aw-scope 'frame
aw-background t)))) aw-background t))