emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm 7778766 1/3: Allow customizing undetectable comman


From: Chris Feng
Subject: [elpa] externals/exwm 7778766 1/3: Allow customizing undetectable commands
Date: Wed, 2 Oct 2019 12:34:36 -0400 (EDT)

branch: externals/exwm
commit 7778766af824326d89cf4bce7541823218d43adc
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    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.
---
 exwm-input.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/exwm-input.el b/exwm-input.el
index c8cf018..7833130 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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]