about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2019-10-02T00·00+0000
committerChris Feng <chris.w.feng@gmail.com>2019-10-02T00·00+0000
commit7778766af824326d89cf4bce7541823218d43adc (patch)
tree0459efc39a0811dfb2e6099b2582cb13ff157e3f
parent9bea3c9bcd02dc2647881feaaacbf71f6c25ff64 (diff)
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.
-rw-r--r--exwm-input.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/exwm-input.el b/exwm-input.el
index c8cf01817cfd..7833130d7811 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -960,6 +960,10 @@ Notes:
          (set symbol 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)
   (let ((cursor-in-echo-area t)
         keys key)
@@ -1029,7 +1033,7 @@ where both ORIGINAL-KEY and SIMULATED-KEY are key sequences."
 
 (defun exwm-input--on-pre-command ()
   "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)))
 
 (defun exwm-input--on-post-command ()