mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-27 06:48:00 +01:00
Command for toggling debugging output
* exwm-core.el (exwm-debug-toggle): New function for toggling debugging output. (exwm-mode-map): Use it.
This commit is contained in:
parent
3419337f52
commit
ac1372eb11
1 changed files with 12 additions and 1 deletions
13
exwm-core.el
13
exwm-core.el
|
@ -85,6 +85,16 @@ FORMAT-STRING is a string specifying the message to output, as in
|
|||
,@objects)
|
||||
nil))
|
||||
|
||||
(defun exwm-debug-toggle (&optional arg)
|
||||
"Toggle EXWM debugging output.
|
||||
When ARG is positive, turn debugging on; when negative off. When
|
||||
ARG is nil, toggle debugging output."
|
||||
(interactive
|
||||
(list (or current-prefix-arg 'toggle)))
|
||||
(setq exwm-debug-on (if (eq arg 'toggle)
|
||||
(not exwm-debug-on)
|
||||
(> 0 arg))))
|
||||
|
||||
(defsubst exwm--id->buffer (id)
|
||||
"X window ID => Emacs buffer."
|
||||
(cdr (assoc id exwm--id-buffer-alist)))
|
||||
|
@ -293,7 +303,8 @@ least SECS seconds later."
|
|||
(exwm--debug
|
||||
(let ((map exwm-mode-map))
|
||||
(define-key map "\C-c\C-d\C-l" #'xcb-debug-clear)
|
||||
(define-key map "\C-c\C-d\C-m" #'xcb-debug-mark)))
|
||||
(define-key map "\C-c\C-d\C-m" #'xcb-debug-mark)
|
||||
(define-key map "\C-c\C-d\C-t" #'exwm-debug-toggle)))
|
||||
|
||||
(define-derived-mode exwm-mode nil "EXWM"
|
||||
"Major mode for managing X windows.
|
||||
|
|
Loading…
Reference in a new issue