emacs: ensure prot/crm-p does not error out when crm has not been loaded yet

This commit is contained in:
Protesilaos Stavrou 2025-12-17 16:41:21 +02:00
parent 8f7b2a1b76
commit 3753e9e3f5
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
2 changed files with 4 additions and 2 deletions

View file

@ -194,7 +194,8 @@ Also see `prot/choose-completion-no-exit' and `prot/choose-completion-dwim'."
(defun prot/crm-p ()
"Return non-nil if `completing-read-multiple' is in use."
(when-let* ((window (active-minibuffer-window))
(when-let* ((_ (bound-and-true-p crm-completion-table))
(window (active-minibuffer-window))
(buffer (window-buffer window)))
(buffer-local-value 'crm-completion-table buffer)))

View file

@ -4501,7 +4501,8 @@ Also see `prot/choose-completion-no-exit' and `prot/choose-completion-dwim'."
(defun prot/crm-p ()
"Return non-nil if `completing-read-multiple' is in use."
(when-let* ((window (active-minibuffer-window))
(when-let* ((_ (bound-and-true-p crm-completion-table))
(window (active-minibuffer-window))
(buffer (window-buffer window)))
(buffer-local-value 'crm-completion-table buffer)))