about summary refs log tree commit diff
path: root/exwm.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2018-02-18T16·04+0800
committerChris Feng <chris.w.feng@gmail.com>2018-02-18T16·04+0800
commitd22e6740d761bd2c67e928579502a6c2816516a9 (patch)
tree3edd721d4e0d1e3ec7778d30ec0f63fb115ea8fa /exwm.el
parent7823eb988c22f5dc804ef862d91a0fcf474ca718 (diff)
Add customization settings
; Also fix documentations.
Diffstat (limited to 'exwm.el')
-rw-r--r--exwm.el59
1 files changed, 33 insertions, 26 deletions
diff --git a/exwm.el b/exwm.el
index 02e9152ed0e6..3e445b21eec7 100644
--- a/exwm.el
+++ b/exwm.el
@@ -72,9 +72,41 @@
 (require 'exwm-manage)
 (require 'exwm-input)
 
+(defgroup exwm nil
+  "Emacs X Window Manager."
+  :tag "EXWM"
+  :version "25.3"
+  :group 'applications
+  :prefix "exwm-")
+
+(defcustom exwm-init-hook nil
+  "Normal hook run when EXWM has just finished initialization."
+  :type 'hook)
+
+(defcustom exwm-exit-hook nil
+  "Normal hook run just before EXWM exits."
+  :type 'hook)
+
+(defcustom exwm-update-class-hook nil
+  "Normal hook run when window class is updated."
+  :type 'hook)
+
+(defcustom exwm-update-title-hook nil
+  "Normal hook run when window title is updated."
+  :type 'hook)
+
+(defcustom exwm-blocking-subrs '(x-file-dialog x-popup-dialog x-select-font)
+  "Subrs (primitives) that would normally block EXWM."
+  :type '(repeat function))
+
+(defconst exwm--server-name "server-exwm"
+  "Name of the subordinate Emacs server.")
+
+(defvar exwm--server-process nil "Process of the subordinate Emacs server.")
+
 ;;;###autoload
 (defun exwm-reset ()
-  "Reset window to standard state: non-fullscreen, line-mode."
+  "Reset the state of the selected window (non-fullscreen, line-mode, etc)."
   (interactive)
   (with-current-buffer (window-buffer)
     (when (eq major-mode 'exwm-mode)
@@ -123,9 +155,6 @@
         (when reply                     ;nil when destroyed
           (setq exwm-window-type (append (slot-value reply 'value) nil)))))))
 
-(defvar exwm-update-class-hook nil
-  "Normal hook run when window class is updated.")
-
 (defun exwm--update-class (id &optional force)
   "Update WM_CLASS."
   (with-current-buffer (exwm--id->buffer id)
@@ -138,9 +167,6 @@
           (when (and exwm-instance-name exwm-class-name)
             (run-hooks 'exwm-update-class-hook)))))))
 
-(defvar exwm-update-title-hook nil
-  "Normal hook run when window title is updated.")
-
 (defun exwm--update-utf8-title (id &optional force)
   "Update _NET_WM_NAME."
   (with-current-buffer (exwm--id->buffer id)
@@ -645,9 +671,6 @@
                        :property p))
     (xcb:flush exwm--connection)))
 
-(defvar exwm-init-hook nil
-  "Normal hook run when EXWM has just finished initialization.")
-
 (defun exwm-init (&optional frame)
   "Initialize EXWM."
   (if frame
@@ -692,8 +715,6 @@
         (exwm-manage--scan)
         (run-hooks 'exwm-init-hook)))))
 
-(defvar exwm-exit-hook nil "Normal hook run just before EXWM exits.")
-
 (defun exwm--exit ()
   "Exit EXWM."
   (run-hooks 'exwm-exit-hook)
@@ -705,9 +726,6 @@
   (exwm-layout--exit)
   (exwm--exit-icccm-ewmh))
 
-(defvar exwm-blocking-subrs '(x-file-dialog x-popup-dialog x-select-font)
-  "Subrs (primitives) that would normally block EXWM.")
-
 (defun exwm-enable (&optional undo)
   "Enable/Disable EXWM."
   (pcase undo
@@ -734,10 +752,6 @@
      (dolist (i exwm-blocking-subrs)
        (advice-add i :around #'exwm--server-eval-at)))))
 
-(defconst exwm--server-name "server-exwm"
-  "Name of the subordinate Emacs server.")
-(defvar exwm--server-process nil "Process of the subordinate Emacs server.")
-
 (defun exwm--server-stop ()
   "Stop the subordinate Emacs server."
   (server-force-delete exwm--server-name)
@@ -784,13 +798,6 @@
                ;; For other types, return the value as-is.
                (t result))))))
 
-(define-obsolete-function-alias 'exwm-enable-ido-workaround 'exwm-config-ido
-  "25.1" "Enable workarounds for Ido.")
-
-(defun exwm-disable-ido-workaround ()
-  "This function does nothing actually."
-  (declare (obsolete nil "25.1")))
-
 
 
 (provide 'exwm)