about summary refs log tree commit diff
path: root/exwm-core.el
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2023-08-18T00·00+0000
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2023-08-18T00·00+0000
commitd3567a8c7f41832617624feedc2c1c6477c4acb9 (patch)
tree3b3a1d0466889edf2cd00d27dce5de51f3d4b049 /exwm-core.el
parentc7d1fd45bcf586e4b62daa94662dfe529cb04ac9 (diff)
Fix bytecompiler warnings, improve docstrings
* exwm-core.el:
* exwm-input.el:
* exwm-layout.el:
* exwm-manage.el:
* exwm-systemtray.el:
* exwm-workspace.el:
* exwm-xim.el: Improve docstrings.

* exwm-xim.el (cl-lib): Require `cl-lib' at runtime for
  `cl-position'.
* exwm-core.el (exwm-debug): Specify custom's group.
* exwm-systemtray.el (xcb:systemtray:-ClientMessage): Quote
  `:initform''s argument.
Diffstat (limited to 'exwm-core.el')
-rw-r--r--exwm-core.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/exwm-core.el b/exwm-core.el
index 890963d17c..4df57e7381 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -93,10 +93,12 @@ Here are some predefined candidates:
                   (frame-or-index &optional id))
 
 (define-minor-mode exwm-debug
-  "Debug-logging enabled if non-nil"
-  :global t)
+  "Debug-logging enabled if non-nil."
+  :global t
+  :group 'exwm-debug)
 
 (defmacro exwm--debug (&rest forms)
+  "Evaluate FORMS if mode `exwm-debug' is active."
   (when exwm-debug `(progn ,@forms)))
 
 (defmacro exwm--log (&optional format-string &rest objects)
@@ -161,7 +163,9 @@ Nil can be passed as placeholder."
                      :x x :y y :width width :height height)))
 
 (defun exwm--intern-atom (atom &optional conn)
-  "Intern X11 ATOM."
+  "Intern X11 ATOM.
+If CONN is non-nil, use it instead of the value of the variable
+`exwm--connection'."
   (slot-value (xcb:+request-unchecked+reply (or conn exwm--connection)
                   (make-instance 'xcb:InternAtom
                                  :only-if-exists 0
@@ -206,7 +210,10 @@ If FRAME is null, use selected frame."
 
 (defun exwm--get-visual-depth-colormap (conn id)
   "Get visual, depth and colormap from X window ID.
-Return a three element list with the respective results."
+Return a three element list with the respective results.
+
+If CONN is non-nil, use it instead of the value of the variable
+`exwm--connection'."
   (let (ret-visual ret-depth ret-colormap)
     (with-slots (visual colormap)
         (xcb:+request-unchecked+reply conn
@@ -238,7 +245,7 @@ One of `line-mode' or `char-mode'.")
 (defvar-local exwm--geometry nil)
 (defvar-local exwm-class-name nil "Class name in WM_CLASS.")
 (defvar-local exwm-instance-name nil "Instance name in WM_CLASS.")
-(defvar-local exwm-title nil "Window title (either _NET_WM_NAME or WM_NAME)")
+(defvar-local exwm-title nil "Window title (either _NET_WM_NAME or WM_NAME).")
 (defvar-local exwm--title-is-utf8 nil)
 (defvar-local exwm-transient-for nil "WM_TRANSIENT_FOR.")
 (defvar-local exwm--protocols nil)