Minor refactors across the board

- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
This commit is contained in:
Henrik Lissner
2019-06-25 21:38:16 +02:00
parent 4ecf6c9414
commit 9a02bd8ac8
42 changed files with 114 additions and 110 deletions

View File

@ -109,7 +109,7 @@ behavior). Do not set this directly, this is let-bound in `doom|init-theme'.")
(and (eq orig-fn #'switch-to-buffer) (car args)))
(apply orig-fn buffer-or-name args)
(let ((doom-inhibit-switch-buffer-hooks t))
(when-let* ((buffer (apply orig-fn buffer-or-name args)))
(when-let (buffer (apply orig-fn buffer-or-name args))
(with-current-buffer (if (windowp buffer)
(window-buffer buffer)
buffer)
@ -121,7 +121,7 @@ behavior). Do not set this directly, this is let-bound in `doom|init-theme'.")
(if doom-inhibit-switch-buffer-hooks
(apply orig-fn args)
(let ((doom-inhibit-switch-buffer-hooks t))
(when-let* ((buffer (apply orig-fn args)))
(when-let (buffer (apply orig-fn args))
(with-current-buffer buffer
(run-hooks 'doom-switch-buffer-hook))
buffer)))))
@ -508,9 +508,10 @@ By default, this uses Apple Color Emoji on MacOS and Symbola on Linux."
:around #'doom*run-switch-buffer-hooks))
;; Apply `doom-theme'
(if (daemonp)
(add-hook 'after-make-frame-functions #'doom|init-theme)
(add-hook 'doom-init-ui-hook #'doom|init-theme))
(add-hook (if (daemonp)
'after-make-frame-functions
'doom-init-ui-hook)
#'doom|init-theme)
;; Apply `doom-font' et co
(add-hook 'doom-after-init-modules-hook #'doom|init-fonts)
;; Ensure unicode fonts are set on each frame