emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm 21351f6 2/2: Be more precise when choosing the ini


From: Chris Feng
Subject: [elpa] externals/exwm 21351f6 2/2: Be more precise when choosing the init hook
Date: Wed, 8 Nov 2017 12:29:36 -0500 (EST)

branch: externals/exwm
commit 21351f6be32d6867edbf887cfb12c5c9d73873c6
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    Be more precise when choosing the init hook
    
    * exwm.el (exwm-enable): Run `exwm-init' in
    `after-make-frame-functions' only for emacsclient and
    `window-setup-hook' only for ordinary sessions.
---
 exwm.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/exwm.el b/exwm.el
index 8ef1fc4..fe10246 100644
--- a/exwm.el
+++ b/exwm.el
@@ -726,8 +726,11 @@
      ;; Ignore unrecognized command line arguments.  This can be helpful
      ;; when EXWM is launched by some session manager.
      (push #'vector command-line-functions)
-     (add-hook 'window-setup-hook #'exwm-init t)          ;for Emacs
-     (add-hook 'after-make-frame-functions #'exwm-init t) ;for Emacs Client
+     (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 'kill-emacs-hook #'exwm--server-stop)
      (dolist (i exwm-blocking-subrs)
        (advice-add i :around #'exwm--server-eval-at)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]