Correct the detection of emacsclient

* exwm.el (exwm-enable): Use `daemonp' instead of `display-graphic-p'.
This commit is contained in:
Chris Feng 2017-11-19 14:44:28 +08:00
parent 61274e0953
commit 0106dd69c7

View file

@ -726,11 +726,10 @@
;; Ignore unrecognized command line arguments. This can be helpful
;; when EXWM is launched by some session manager.
(push #'vector command-line-functions)
(if (display-graphic-p)
;; emacs.
(add-hook 'window-setup-hook #'exwm-init t)
;; emacsclient.
(add-hook 'after-make-frame-functions #'exwm-init t))
(add-hook (if (daemonp)
'after-make-frame-functions ;emacsclient
'window-setup-hook) ;emacs
#'exwm-init t)
(add-hook 'kill-emacs-hook #'exwm--server-stop)
(dolist (i exwm-blocking-subrs)
(advice-add i :around #'exwm--server-eval-at)))))