Restore non-obsolete exwm-debug variable

* exwm-core.el (exwm-debug): Reintroduce exwm-debug variable.
This commit is contained in:
Daniel Mendler 2024-06-06 09:59:31 +02:00
parent 9e965fd2af
commit 63bde86545
No known key found for this signature in database
GPG key ID: D88ADB2A2693CA43

View file

@ -98,15 +98,16 @@ nil: Disable timestamp."
(declare-function exwm-workspace-switch "exwm-workspace.el" (declare-function exwm-workspace-switch "exwm-workspace.el"
(frame-or-index &optional force)) (frame-or-index &optional force))
(defvaralias 'exwm-debug 'exwm-debug-mode) ;; Not obsolete
(define-minor-mode exwm-debug-mode (define-minor-mode exwm-debug-mode
"Debug-logging enabled if non-nil." "Debug-logging enabled if non-nil."
:global t :global t
:group 'exwm-debug) :group 'exwm-debug)
(define-obsolete-function-alias 'exwm-debug 'exwm-debug-mode "0.30") (define-obsolete-function-alias 'exwm-debug #'exwm-debug-mode "0.30")
(defmacro exwm--debug (&rest forms) (defmacro exwm--debug (&rest forms)
"Evaluate FORMS if `exwm-debug-mode' is active." "Evaluate FORMS if `exwm-debug-mode' is active."
(when exwm-debug-mode `(progn ,@forms))) (when exwm-debug `(progn ,@forms)))
(defmacro exwm--log (&optional format-string &rest objects) (defmacro exwm--log (&optional format-string &rest objects)
"Emit a message prepending the name of the function being executed. "Emit a message prepending the name of the function being executed.
@ -114,7 +115,7 @@ nil: Disable timestamp."
FORMAT-STRING is a string specifying the message to output, as in FORMAT-STRING is a string specifying the message to output, as in
`format'. The OBJECTS arguments specify the substitutions." `format'. The OBJECTS arguments specify the substitutions."
(unless format-string (setq format-string "")) (unless format-string (setq format-string ""))
`(when exwm-debug-mode `(when exwm-debug
(xcb-debug:message ,(concat "%s%s:\t" format-string "\n") (xcb-debug:message ,(concat "%s%s:\t" format-string "\n")
(if exwm-debug-log-time-function (if exwm-debug-log-time-function
(funcall exwm-debug-log-time-function) (funcall exwm-debug-log-time-function)