From 4321cc079b2b567b0e9f25767417b1a7dc97b1ac Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sun, 22 Dec 2024 14:02:49 +0100 Subject: [PATCH] Remove deprecated exwm-*-enable functions The corresponding global minor modes should be used instead. * exwm-background.el (exwm-background-enable): Remove function. * exwm-core.el (exwm-debug): Remove function. * exwm-randr.el (exwm-randr-enable): Remove function. * exwm-systemtray.el (exwm-systemtray-enable): Remove function. * exwm-xim.el (exwm-xim-enable): Remove function. * exwm-xsettings.el (exwm-xsettings-enable): Remove function. --- exwm-background.el | 6 ------ exwm-core.el | 3 +-- exwm-randr.el | 12 +++--------- exwm-systemtray.el | 6 ------ exwm-xim.el | 6 ------ exwm-xsettings.el | 6 ------ 6 files changed, 4 insertions(+), 35 deletions(-) diff --git a/exwm-background.el b/exwm-background.el index 9d8497d..7b3481d 100644 --- a/exwm-background.el +++ b/exwm-background.el @@ -45,12 +45,6 @@ :group 'exwm-background (exwm--global-minor-mode-body background)) -(defun exwm-background-enable () - "Enable EXWM background support." - (message "`exwm-background-enable' is obsolete. Use `exwm-background-mode' instead.") - (exwm-background-mode 1)) -(make-obsolete 'exwm-background-enable "Use `exwm-background-mode' instead." "0.30") - (defcustom exwm-background-color nil "Background color for Xorg." :type '(choice diff --git a/exwm-core.el b/exwm-core.el index 0f9b705..de2e3ad 100644 --- a/exwm-core.el +++ b/exwm-core.el @@ -99,12 +99,11 @@ nil: Disable timestamp." (declare-function exwm-workspace-switch "exwm-workspace.el" (frame-or-index &optional force)) -(defvaralias 'exwm-debug 'exwm-debug-mode) ;; Not obsolete +(defvaralias 'exwm-debug 'exwm-debug-mode) (define-minor-mode exwm-debug-mode "Debug-logging enabled if non-nil." :global t :group 'exwm-debug) -(define-obsolete-function-alias 'exwm-debug #'exwm-debug-mode "0.30") (defmacro exwm--debug (&rest forms) "Evaluate FORMS if `exwm-debug-mode' is active." diff --git a/exwm-randr.el b/exwm-randr.el index 4446b42..9e7afe6 100644 --- a/exwm-randr.el +++ b/exwm-randr.el @@ -106,12 +106,6 @@ corresponding monitors whenever the monitors are active. :group 'exwm-randr (exwm--global-minor-mode-body randr)) -(defun exwm-randr-enable () - "Enable EXWM RandR support." - (message "`exwm-randr-enable' is obsolete. Use `exwm-randr-mode' instead.") - (exwm-randr-mode 1)) -(make-obsolete 'exwm-randr-enable "Use `exwm-randr-mode' instead." "0.30") - (defsubst exwm-randr--assert-connected () "Assert that `exwm-randr-mode' is enabled and activated." (cond @@ -307,9 +301,9 @@ Refresh when any CRTC/output changes." (xcb:unmarshal evt data) (with-slots (subCode u) evt (cond ((= subCode xcb:randr:Notify:CrtcChange) - (setq notify (slot-value u 'cc))) - ((= subCode xcb:randr:Notify:OutputChange) - (setq notify (slot-value u 'oc)))) + (setq notify (slot-value u 'cc))) + ((= subCode xcb:randr:Notify:OutputChange) + (setq notify (slot-value u 'oc)))) (when notify (with-slots (timestamp) notify (when (> timestamp exwm-randr--last-timestamp) diff --git a/exwm-systemtray.el b/exwm-systemtray.el index 622e531..bc7d2a6 100644 --- a/exwm-systemtray.el +++ b/exwm-systemtray.el @@ -57,12 +57,6 @@ :group 'exwm-systemtray (exwm--global-minor-mode-body systemtray)) -(defun exwm-systemtray-enable () - "Enable EXWM systemtray support." - (message "`exwm-systemtray-enable' is obsolete. Use `exwm-systemtray-mode' instead.") - (exwm-systemtray-mode 1)) -(make-obsolete 'exwm-systemtray-enable "Use `exwm-systemtray-mode' instead." "0.30") - (defcustom exwm-systemtray-height nil "System tray height. diff --git a/exwm-xim.el b/exwm-xim.el index e0f457a..8546f51 100644 --- a/exwm-xim.el +++ b/exwm-xim.el @@ -803,12 +803,6 @@ Such event would be received when the client window is destroyed." :group 'exwm (exwm--global-minor-mode-body xim)) -(defun exwm-xim-enable () - "Enable EXWM XIM support." - (message "`exwm-xim-enable' is obsolete. Use `exwm-xim-mode' instead.") - (exwm-xim-mode 1)) -(make-obsolete 'exwm-xim-enable "Use `exwm-xim-mode' instead." "0.30") - (provide 'exwm-xim) diff --git a/exwm-xsettings.el b/exwm-xsettings.el index cf83023..a47573a 100644 --- a/exwm-xsettings.el +++ b/exwm-xsettings.el @@ -68,12 +68,6 @@ :group 'exwm-xsettings (exwm--global-minor-mode-body xsettings)) -(defun exwm-xsettings-enable () - "Enable EXWM xsettings support." - (message "`exwm-xsettings-enable' is obsolete. Use `exwm-xsettings-mode' instead.") - (exwm-xsettings-mode 1)) -(make-obsolete 'exwm-xsettings-enable "Use `exwm-xsettings-mode' instead." "0.30") - (defun exwm-xsettings--rgba-match (_widget value) "Return t if VALUE is a valid RGBA color." (and (numberp value) (<= 0 value 1)))