Reduce autoloads

Only entry points to EXWM are marked as autoloaded. These are the functions
`exwm-enable' and `exwm-*-mode'.
This commit is contained in:
Daniel Mendler 2024-12-22 14:17:35 +01:00
parent 66f610203d
commit 6b49a2fa18
5 changed files with 0 additions and 36 deletions

View file

@ -564,7 +564,6 @@ Notes:
(when exwm--connection (when exwm--connection
(exwm-input--update-global-prefix-keys)))) (exwm-input--update-global-prefix-keys))))
;;;###autoload
(defun exwm-input-set-key (key command) (defun exwm-input-set-key (key command)
"Set a global KEY binding to COMMAND. "Set a global KEY binding to COMMAND.
@ -840,7 +839,6 @@ button event."
(setq exwm--input-mode 'char-mode) (setq exwm--input-mode 'char-mode)
(run-hooks 'exwm-input-input-mode-change-hook)))))) (run-hooks 'exwm-input-input-mode-change-hook))))))
;;;###autoload
(defun exwm-input-grab-keyboard (&optional id) (defun exwm-input-grab-keyboard (&optional id)
"Switch to `line-mode`. "Switch to `line-mode`.
When ID is non-nil, grab key events on its corresponding window." When ID is non-nil, grab key events on its corresponding window."
@ -852,7 +850,6 @@ When ID is non-nil, grab key events on its corresponding window."
(exwm-input--grab-keyboard id) (exwm-input--grab-keyboard id)
(exwm-input--update-mode-line id))) (exwm-input--update-mode-line id)))
;;;###autoload
(defun exwm-input-release-keyboard (&optional id) (defun exwm-input-release-keyboard (&optional id)
"Switch to `char-mode`. "Switch to `char-mode`.
When ID is non-nil, release keyboard events on its corresponding window." When ID is non-nil, release keyboard events on its corresponding window."
@ -864,7 +861,6 @@ When ID is non-nil, release keyboard events on its corresponding window."
(exwm-input--release-keyboard id) (exwm-input--release-keyboard id)
(exwm-input--update-mode-line id))) (exwm-input--update-mode-line id)))
;;;###autoload
(defun exwm-input-toggle-keyboard (&optional id) (defun exwm-input-toggle-keyboard (&optional id)
"Toggle between `line-mode' and `char-mode'. "Toggle between `line-mode' and `char-mode'.
When ID is non-nil, toggle in its correpsonding window." When ID is non-nil, toggle in its correpsonding window."
@ -908,7 +904,6 @@ When ID is non-nil, toggle in its correpsonding window."
exwm--connection))))) exwm--connection)))))
(xcb:flush exwm--connection))) (xcb:flush exwm--connection)))
;;;###autoload
(cl-defun exwm-input-send-next-key (n &optional end-key) (cl-defun exwm-input-send-next-key (n &optional end-key)
"Send next N keys to client window. "Send next N keys to client window.
N is currently capped at 12. N is currently capped at 12.
@ -1024,7 +1019,6 @@ Notes:
(when (> (length keys) 1) (when (> (length keys) 1)
(substring keys 0 -1)))) (substring keys 0 -1))))
;;;###autoload
(defun exwm-input-set-simulation-key (original-key simulated-key) (defun exwm-input-set-simulation-key (original-key simulated-key)
"Set ORIGINAL-KEY to SIMULATED-KEY. "Set ORIGINAL-KEY to SIMULATED-KEY.
@ -1068,7 +1062,6 @@ where both ORIGINAL-KEY and SIMULATED-KEY are key sequences."
(let ((exwm-input--local-simulation-keys t)) (let ((exwm-input--local-simulation-keys t))
(exwm-input--set-simulation-keys simulation-keys))) (exwm-input--set-simulation-keys simulation-keys)))
;;;###autoload
(cl-defun exwm-input-send-simulation-key (n) (cl-defun exwm-input-send-simulation-key (n)
"Fake N key events according to the last input key sequence." "Fake N key events according to the last input key sequence."
(interactive "p") (interactive "p")
@ -1081,7 +1074,6 @@ where both ORIGINAL-KEY and SIMULATED-KEY are key sequences."
(dolist (key keys) (dolist (key keys)
(exwm-input--fake-key key))))) (exwm-input--fake-key key)))))
;;;###autoload
(defmacro exwm-input-invoke-factory (keys) (defmacro exwm-input-invoke-factory (keys)
"Make a command that invokes KEYS when called. "Make a command that invokes KEYS when called.

View file

@ -187,7 +187,6 @@ See variable `exwm-layout-auto-iconify'."
(exwm-layout--auto-iconify) (exwm-layout--auto-iconify)
(xcb:flush exwm--connection)))) (xcb:flush exwm--connection))))
;;;###autoload
(cl-defun exwm-layout-set-fullscreen (&optional id) (cl-defun exwm-layout-set-fullscreen (&optional id)
"Make window ID fullscreen." "Make window ID fullscreen."
(interactive) (interactive)
@ -213,7 +212,6 @@ See variable `exwm-layout-auto-iconify'."
(set-window-dedicated-p (get-buffer-window) t) (set-window-dedicated-p (get-buffer-window) t)
(exwm-input--release-keyboard exwm--id))) (exwm-input--release-keyboard exwm--id)))
;;;###autoload
(cl-defun exwm-layout-unset-fullscreen (&optional id) (cl-defun exwm-layout-unset-fullscreen (&optional id)
"Restore X window ID from fullscreen state." "Restore X window ID from fullscreen state."
(interactive) (interactive)
@ -244,7 +242,6 @@ See variable `exwm-layout-auto-iconify'."
(when (eq 'line-mode exwm--selected-input-mode) (when (eq 'line-mode exwm--selected-input-mode)
(exwm-input--grab-keyboard exwm--id)))) (exwm-input--grab-keyboard exwm--id))))
;;;###autoload
(defun exwm-layout-toggle-fullscreen (&optional id) (defun exwm-layout-toggle-fullscreen (&optional id)
"Toggle fullscreen mode of X window ID. "Toggle fullscreen mode of X window ID.
If ID is non-nil, default to ID of `window-buffer'." If ID is non-nil, default to ID of `window-buffer'."
@ -434,7 +431,6 @@ If DIRTY is non-nil, refresh layout immediately."
(exwm-layout--refresh exwm-workspace--current) (exwm-layout--refresh exwm-workspace--current)
(exwm--defer 0 #'exwm-layout--refresh exwm-workspace--current))))) (exwm--defer 0 #'exwm-layout--refresh exwm-workspace--current)))))
;;;###autoload
(defun exwm-layout-enlarge-window (delta &optional horizontal) (defun exwm-layout-enlarge-window (delta &optional horizontal)
"Make the selected window DELTA pixels taller. "Make the selected window DELTA pixels taller.
@ -524,7 +520,6 @@ windows."
:height height)) :height height))
(xcb:flush exwm--connection)))))) (xcb:flush exwm--connection))))))
;;;###autoload
(defun exwm-layout-enlarge-window-horizontally (delta) (defun exwm-layout-enlarge-window-horizontally (delta)
"Make the selected window DELTA pixels wider. "Make the selected window DELTA pixels wider.
@ -533,7 +528,6 @@ See also `exwm-layout-enlarge-window'."
(exwm--log "%s" delta) (exwm--log "%s" delta)
(exwm-layout-enlarge-window delta t)) (exwm-layout-enlarge-window delta t))
;;;###autoload
(defun exwm-layout-shrink-window (delta) (defun exwm-layout-shrink-window (delta)
"Make the selected window DELTA pixels lower. "Make the selected window DELTA pixels lower.
@ -542,7 +536,6 @@ See also `exwm-layout-enlarge-window'."
(exwm--log "%s" delta) (exwm--log "%s" delta)
(exwm-layout-enlarge-window (- delta))) (exwm-layout-enlarge-window (- delta)))
;;;###autoload
(defun exwm-layout-shrink-window-horizontally (delta) (defun exwm-layout-shrink-window-horizontally (delta)
"Make the selected window DELTA pixels narrower. "Make the selected window DELTA pixels narrower.
@ -551,7 +544,6 @@ See also `exwm-layout-enlarge-window'."
(exwm--log "%s" delta) (exwm--log "%s" delta)
(exwm-layout-enlarge-window (- delta) t)) (exwm-layout-enlarge-window (- delta) t))
;;;###autoload
(defun exwm-layout-hide-mode-line () (defun exwm-layout-hide-mode-line ()
"Hide mode-line." "Hide mode-line."
(interactive) (interactive)
@ -570,7 +562,6 @@ See also `exwm-layout-enlarge-window'."
mode-line-height) mode-line-height)
nil t))))) nil t)))))
;;;###autoload
(defun exwm-layout-show-mode-line () (defun exwm-layout-show-mode-line ()
"Show mode-line." "Show mode-line."
(interactive) (interactive)
@ -588,7 +579,6 @@ See also `exwm-layout-enlarge-window'."
(call-interactively #'exwm-input-grab-keyboard)) (call-interactively #'exwm-input-grab-keyboard))
(force-mode-line-update))) (force-mode-line-update)))
;;;###autoload
(defun exwm-layout-toggle-mode-line () (defun exwm-layout-toggle-mode-line ()
"Toggle the display of mode-line." "Toggle the display of mode-line."
(interactive) (interactive)

View file

@ -212,7 +212,6 @@ In a mirroring setup some monitors overlap and should be treated as one."
monitor-alias-alist)))))) monitor-alias-alist))))))
monitor-alias-alist)) monitor-alias-alist))
;;;###autoload
(defun exwm-randr-refresh () (defun exwm-randr-refresh ()
"Refresh workspaces according to the updated RandR info." "Refresh workspaces according to the updated RandR info."
(interactive) (interactive)

View file

@ -294,7 +294,6 @@ Show PROMPT to the user if non-nil."
sequence "")) sequence ""))
sequence))))) sequence)))))
;;;###autoload
(defun exwm-workspace--get-geometry (frame) (defun exwm-workspace--get-geometry (frame)
"Return the geometry of frame FRAME." "Return the geometry of frame FRAME."
(or (frame-parameter frame 'exwm-geometry) (or (frame-parameter frame 'exwm-geometry)
@ -304,7 +303,6 @@ Show PROMPT to the user if non-nil."
:width (x-display-pixel-width) :width (x-display-pixel-width)
:height (x-display-pixel-height)))) :height (x-display-pixel-height))))
;;;###autoload
(defun exwm-workspace--current-height () (defun exwm-workspace--current-height ()
"Return the height of current workspace." "Return the height of current workspace."
(let ((geometry (frame-parameter exwm-workspace--current 'exwm-geometry))) (let ((geometry (frame-parameter exwm-workspace--current 'exwm-geometry)))
@ -312,7 +310,6 @@ Show PROMPT to the user if non-nil."
(slot-value geometry 'height) (slot-value geometry 'height)
(x-display-pixel-height)))) (x-display-pixel-height))))
;;;###autoload
(defun exwm-workspace--minibuffer-own-frame-p () (defun exwm-workspace--minibuffer-own-frame-p ()
"Reports whether the minibuffer is displayed in its own frame." "Reports whether the minibuffer is displayed in its own frame."
(memq exwm-workspace-minibuffer-position '(top bottom))) (memq exwm-workspace-minibuffer-position '(top bottom)))
@ -560,7 +557,6 @@ PREFIX-DIGITS is a list of the digits introduced so far."
(goto-history-element (1+ n)) (goto-history-element (1+ n))
(exit-minibuffer)) (exit-minibuffer))
;;;###autoload
(defun exwm-workspace-switch (frame-or-index &optional force) (defun exwm-workspace-switch (frame-or-index &optional force)
"Switch to workspace FRAME-OR-INDEX (0-based). "Switch to workspace FRAME-OR-INDEX (0-based).
@ -692,7 +688,6 @@ When FORCE is true, allow switching to current workspace."
(funcall exwm-workspace--original-handle-focus-in (list 'focus-in frame)) (funcall exwm-workspace--original-handle-focus-in (list 'focus-in frame))
(run-hooks 'exwm-workspace-switch-hook))) (run-hooks 'exwm-workspace-switch-hook)))
;;;###autoload
(defun exwm-workspace-switch-create (frame-or-index) (defun exwm-workspace-switch-create (frame-or-index)
"Switch to workspace FRAME-OR-INDEX creating it first non-existent. "Switch to workspace FRAME-OR-INDEX creating it first non-existent.
@ -717,7 +712,6 @@ Passing a workspace frame as the first option is for internal use only."
(run-hooks 'exwm-workspace-list-change-hook)) (run-hooks 'exwm-workspace-list-change-hook))
(exwm-workspace-switch frame-or-index))) (exwm-workspace-switch frame-or-index)))
;;;###autoload
(defun exwm-workspace-swap (workspace1 workspace2) (defun exwm-workspace-swap (workspace1 workspace2)
"Interchange position of WORKSPACE1 with that of WORKSPACE2." "Interchange position of WORKSPACE1 with that of WORKSPACE2."
(interactive (interactive
@ -753,7 +747,6 @@ Passing a workspace frame as the first option is for internal use only."
(exwm-workspace-switch exwm-workspace--current t)) (exwm-workspace-switch exwm-workspace--current t))
(run-hooks 'exwm-workspace-list-change-hook)))) (run-hooks 'exwm-workspace-list-change-hook))))
;;;###autoload
(defun exwm-workspace-move (workspace nth) (defun exwm-workspace-move (workspace nth)
"Move WORKSPACE to the NTH position. "Move WORKSPACE to the NTH position.
@ -800,7 +793,6 @@ before it."
(exwm-workspace-switch exwm-workspace--current t)) (exwm-workspace-switch exwm-workspace--current t))
(run-hooks 'exwm-workspace-list-change-hook)))) (run-hooks 'exwm-workspace-list-change-hook))))
;;;###autoload
(defun exwm-workspace-add (&optional index) (defun exwm-workspace-add (&optional index)
"Add a workspace as the INDEX-th workspace, or the last one if INDEX is nil. "Add a workspace as the INDEX-th workspace, or the last one if INDEX is nil.
@ -813,7 +805,6 @@ INDEX must not exceed the current number of workspaces."
(exwm-workspace-move (make-frame) index) (exwm-workspace-move (make-frame) index)
(make-frame))) (make-frame)))
;;;###autoload
(defun exwm-workspace-delete (&optional frame-or-index) (defun exwm-workspace-delete (&optional frame-or-index)
"Delete the workspace FRAME-OR-INDEX." "Delete the workspace FRAME-OR-INDEX."
(interactive) (interactive)
@ -841,7 +832,6 @@ INDEX must not exceed the current number of workspaces."
:window id :window id
:data desktop))))) :data desktop)))))
;;;###autoload
(cl-defun exwm-workspace-move-window (frame-or-index &optional id) (cl-defun exwm-workspace-move-window (frame-or-index &optional id)
"Move window ID to workspace FRAME-OR-INDEX." "Move window ID to workspace FRAME-OR-INDEX."
(interactive (list (interactive (list
@ -983,7 +973,6 @@ INDEX must not exceed the current number of workspaces."
(xcb:flush exwm--connection))) (xcb:flush exwm--connection)))
(setq exwm-workspace--switch-history-outdated t))) (setq exwm-workspace--switch-history-outdated t)))
;;;###autoload
(defun exwm-workspace-switch-to-buffer (buffer-or-name) (defun exwm-workspace-switch-to-buffer (buffer-or-name)
"Make selected window display BUFFER-OR-NAME." "Make selected window display BUFFER-OR-NAME."
(interactive (interactive
@ -1075,7 +1064,6 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
(assq (frame-parameter exwm-workspace--minibuffer 'exwm-container) (assq (frame-parameter exwm-workspace--minibuffer 'exwm-container)
exwm-workspace--id-struts-alist)) exwm-workspace--id-struts-alist))
;;;###autoload
(defun exwm-workspace-attach-minibuffer () (defun exwm-workspace-attach-minibuffer ()
"Attach the minibuffer making it always visible." "Attach the minibuffer making it always visible."
(interactive) (interactive)
@ -1100,7 +1088,6 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
(dolist (f exwm-workspace--list) (dolist (f exwm-workspace--list)
(exwm-workspace--set-fullscreen f))))) (exwm-workspace--set-fullscreen f)))))
;;;###autoload
(defun exwm-workspace-detach-minibuffer () (defun exwm-workspace-detach-minibuffer ()
"Detach the minibuffer so that it automatically hides." "Detach the minibuffer so that it automatically hides."
(interactive) (interactive)
@ -1118,7 +1105,6 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
(exwm-workspace--set-fullscreen f)) (exwm-workspace--set-fullscreen f))
(exwm-workspace--hide-minibuffer)))) (exwm-workspace--hide-minibuffer))))
;;;###autoload
(defun exwm-workspace-toggle-minibuffer () (defun exwm-workspace-toggle-minibuffer ()
"Attach the minibuffer if it's detached, or detach it if it's attached." "Attach the minibuffer if it's detached, or detach it if it's attached."
(interactive) (interactive)

View file

@ -141,7 +141,6 @@ Set during `exwm-init'.")
(exwm-layout--refresh) (exwm-layout--refresh)
(call-interactively #'exwm-input-grab-keyboard)))) (call-interactively #'exwm-input-grab-keyboard))))
;;;###autoload
(defun exwm-restart () (defun exwm-restart ()
"Restart EXWM." "Restart EXWM."
(interactive) (interactive)
@ -909,7 +908,6 @@ manager. If t, replace it, if nil, abort and ask the user if `ask'."
(xcb:+request exwm--connection se)) (xcb:+request exwm--connection se))
(setq exwm--wmsn-window new-owner)))) (setq exwm--wmsn-window new-owner))))
;;;###autoload
(cl-defun exwm-init (&optional frame) (cl-defun exwm-init (&optional frame)
"Initialize EXWM. "Initialize EXWM.
FRAME, if given, indicates the X display EXWM should manage." FRAME, if given, indicates the X display EXWM should manage."
@ -987,7 +985,6 @@ FRAME, if given, indicates the X display EXWM should manage."
(warn "[EXWM] EXWM fails to start (%s: %s)" (car err) (cdr err))))) (warn "[EXWM] EXWM fails to start (%s: %s)" (car err) (cdr err)))))
;;;###autoload
(defun exwm-exit () (defun exwm-exit ()
"Exit EXWM." "Exit EXWM."
(interactive) (interactive)