branch: externals/exwm
commit 697ff2e53f9c645dd5908c4f3f9397c055be4768
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    ; Hide private commands in M-x via completion-predicate
---
 exwm-input.el     | 1 +
 exwm-workspace.el | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/exwm-input.el b/exwm-input.el
index fc0d0b10a3..44524ac24a 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -659,6 +659,7 @@ Current buffer must be an `exwm-mode' buffer."
 (defun exwm-input--noop (&rest _args)
   "A placeholder command."
   (interactive))
+(put #'exwm-input--noop 'completion-predicate #'ignore) ;; Move to declare in 
Emacs 28
 
 (defun exwm-input--fake-last-command ()
   "Fool some packages into thinking there is a change in the buffer."
diff --git a/exwm-workspace.el b/exwm-workspace.el
index a294d32689..df3605f3b4 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -250,6 +250,7 @@ Show PROMPT to the user if non-nil."
       (run-hooks 'exwm-workspace-list-change-hook))
     (exwm-workspace--update-switch-history)
     (goto-history-element minibuffer-history-position)))
+(put #'exwm-workspace--prompt-add 'completion-predicate #'ignore) ;; Move to 
declare in Emacs 28
 
 (defun exwm-workspace--prompt-delete ()
   "Delete workspace from the prompt."
@@ -266,6 +267,7 @@ Show PROMPT to the user if non-nil."
         (exwm-workspace--update-switch-history)
         (goto-history-element (min minibuffer-history-position
                                    (exwm-workspace--count)))))))
+(put #'exwm-workspace--prompt-delete 'completion-predicate #'ignore) ;; Move 
to declare in Emacs 28
 
 (defun exwm-workspace--update-switch-history ()
   "Update the history for switching workspace to reflect the latest status."
@@ -567,12 +569,14 @@ PREFIX-DIGITS is a list of the digits introduced so far."
              (interactive)
              (exwm-workspace--switch-map-select-nth n)))
          map)))))
+(put #'exwm-workspace--switch-map-nth-prefix 'completion-predicate #'ignore) 
;; Move to declare in Emacs 28
 
 (defun exwm-workspace--switch-map-select-nth (n)
   "Select Nth workspace."
   (interactive)
   (goto-history-element (1+ n))
   (exit-minibuffer))
+(put #'exwm-workspace--switch-map-select-nth 'completion-predicate #'ignore) 
;; Move to declare in Emacs 28
 
 (defun exwm-workspace-switch (frame-or-index &optional force)
   "Switch to workspace FRAME-OR-INDEX (0-based).
@@ -1559,10 +1563,12 @@ applied to all subsequently created X frames."
 (defun exwm-workspace--handle-focus-in (_orig-func _event)
   "Replacement for `handle-focus-in'."
   (interactive "e"))
+(put #'exwm-workspace--handle-focus-in 'completion-predicate #'ignore) ;; Move 
to declare in Emacs 28
 
 (defun exwm-workspace--handle-focus-out (_orig-func _event)
   "Replacement for `handle-focus-out'."
   (interactive "e"))
+(put #'exwm-workspace--handle-focus-out 'completion-predicate #'ignore) ;; 
Move to declare in Emacs 28
 
 (defun exwm-workspace--init-minibuffer-frame ()
   "Initialize minibuffer-only frame."

Reply via email to