mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-27 14:57:59 +01:00
Allow customizing undetectable commands
* exwm-input.el (exwm-input-pre-post-command-blacklist): List of commands undetectable with `post-command-hook'. (exwm-input--on-pre-command): Use it.
This commit is contained in:
parent
9bea3c9bcd
commit
7778766af8
1 changed files with 5 additions and 1 deletions
|
@ -960,6 +960,10 @@ Notes:
|
||||||
(set symbol value)
|
(set symbol value)
|
||||||
(exwm-input--set-simulation-keys value)))
|
(exwm-input--set-simulation-keys value)))
|
||||||
|
|
||||||
|
(defcustom exwm-input-pre-post-command-blacklist '(exit-minibuffer)
|
||||||
|
"Commands impossible to detect with `post-command-hook'."
|
||||||
|
:type '(repeat function))
|
||||||
|
|
||||||
(cl-defun exwm-input--read-keys (prompt stop-key)
|
(cl-defun exwm-input--read-keys (prompt stop-key)
|
||||||
(let ((cursor-in-echo-area t)
|
(let ((cursor-in-echo-area t)
|
||||||
keys key)
|
keys key)
|
||||||
|
@ -1029,7 +1033,7 @@ where both ORIGINAL-KEY and SIMULATED-KEY are key sequences."
|
||||||
|
|
||||||
(defun exwm-input--on-pre-command ()
|
(defun exwm-input--on-pre-command ()
|
||||||
"Run in `pre-command-hook'."
|
"Run in `pre-command-hook'."
|
||||||
(unless (eq this-command #'exit-minibuffer)
|
(unless (memq this-command exwm-input-pre-post-command-blacklist)
|
||||||
(setq exwm-input--during-command t)))
|
(setq exwm-input--during-command t)))
|
||||||
|
|
||||||
(defun exwm-input--on-post-command ()
|
(defun exwm-input--on-post-command ()
|
||||||
|
|
Loading…
Reference in a new issue