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

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

[elpa] externals/counsel bb7965a 1/2: Demote read-extended-command-predi


From: Basil L. Contovounesios
Subject: [elpa] externals/counsel bb7965a 1/2: Demote read-extended-command-predicate errors
Date: Sat, 27 Mar 2021 16:27:27 -0400 (EDT)

branch: externals/counsel
commit bb7965aa645982c9a80bd9e772538a210b645942
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Demote read-extended-command-predicate errors
    
    This matches a recent upstream change in the predicate used by
    read-extended-command:
    
    Demote read-extended-command-predicate errors
    8bf186b229 2021-03-27 20:05:10 +0000
    
https://git.sv.gnu.org/cgit/emacs.git/commit/?id=8bf186b2297dc0aeba76e8e743dec7efa6a568e4
    
    * counsel.el (counsel--M-x-make-predicate): Don't let
    read-extended-command-predicate errors break counsel-M-x.
---
 counsel.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/counsel.el b/counsel.el
index 6c85a28..e561517 100644
--- a/counsel.el
+++ b/counsel.el
@@ -894,9 +894,12 @@ CAND is a string returned by `counsel--M-x-externs'."
       (and (commandp sym)
            (not (get sym 'byte-obsolete-info))
            (not (get sym 'no-counsel-M-x))
-           (or (not (bound-and-true-p read-extended-command-predicate))
-               (and (functionp read-extended-command-predicate)
-                    (funcall read-extended-command-predicate sym buf)))))))
+           (cond ((not (bound-and-true-p read-extended-command-predicate)))
+                 ((functionp read-extended-command-predicate)
+                  (condition-case-unless-debug err
+                      (funcall read-extended-command-predicate sym buf)
+                    (error (message "read-extended-command-predicate: %s: %s"
+                                    sym (error-message-string err))))))))))
 
 (defun counsel--M-x-prompt ()
   "String for `M-x' plus the string representation of `current-prefix-arg'."



reply via email to

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