Add interactive commands for starting and stopping EXWM

* exwm.el (exwm-reset): Remove autoload cookie.
(exwm-init, exwm-exit): Add autoload cookie and interactive
declaration.
This commit is contained in:
Adrián Medraño Calvo 2018-03-06 00:00:00 +00:00
parent ce8af83ffb
commit 587a8cad1d
2 changed files with 7 additions and 4 deletions

View file

@ -1576,7 +1576,7 @@ applied to all subsequently created X frames."
;; (client . nil) ;; (client . nil)
(fullscreen . nil) (fullscreen . nil)
(buffer-predicate . nil)))) (buffer-predicate . nil))))
;; Restore the 'client' frame parameter (before `exwm--exit'). ;; Restore the 'client' frame parameter (before `exwm-exit').
(when exwm-workspace--client (when exwm-workspace--client
(dolist (f exwm-workspace--list) (dolist (f exwm-workspace--list)
(set-frame-parameter f 'client exwm-workspace--client)) (set-frame-parameter f 'client exwm-workspace--client))

View file

@ -104,7 +104,6 @@
(defvar exwm--server-process nil "Process of the subordinate Emacs server.") (defvar exwm--server-process nil "Process of the subordinate Emacs server.")
;;;###autoload
(defun exwm-reset () (defun exwm-reset ()
"Reset the state of the selected window (non-fullscreen, line-mode, etc)." "Reset the state of the selected window (non-fullscreen, line-mode, etc)."
(interactive) (interactive)
@ -690,8 +689,10 @@
:property p)) :property p))
(xcb:flush exwm--connection))) (xcb:flush exwm--connection)))
;;;###autoload
(defun exwm-init (&optional frame) (defun exwm-init (&optional frame)
"Initialize EXWM." "Initialize EXWM."
(interactive)
(if frame (if frame
;; The frame might not be selected if it's created by emacslicnet. ;; The frame might not be selected if it's created by emacslicnet.
(select-frame-set-input-focus frame) (select-frame-set-input-focus frame)
@ -735,8 +736,10 @@
(exwm-manage--scan) (exwm-manage--scan)
(run-hooks 'exwm-init-hook))))) (run-hooks 'exwm-init-hook)))))
(defun exwm--exit () ;;;###autoload
(defun exwm-exit ()
"Exit EXWM." "Exit EXWM."
(interactive)
(run-hooks 'exwm-exit-hook) (run-hooks 'exwm-exit-hook)
(setq confirm-kill-emacs nil) (setq confirm-kill-emacs nil)
;; Exit modules. ;; Exit modules.
@ -855,7 +858,7 @@
(run-hooks 'kill-emacs-hook) (run-hooks 'kill-emacs-hook)
(setq kill-emacs-hook nil)) (setq kill-emacs-hook nil))
;; Exit each module, destroying all resources created by this connection. ;; Exit each module, destroying all resources created by this connection.
(exwm--exit) (exwm-exit)
;; Set the return value. ;; Set the return value.
t)) t))