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

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

[elpa] externals/compat 598a040 69/99: Add :cond check to lookup-key


From: ELPA Syncer
Subject: [elpa] externals/compat 598a040 69/99: Add :cond check to lookup-key
Date: Sun, 17 Oct 2021 05:57:59 -0400 (EDT)

branch: externals/compat
commit 598a040bb0988f5d6cd930fcc1e59ee98703ec6a
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Add :cond check to lookup-key
---
 compat-27.1.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/compat-27.1.el b/compat-27.1.el
index c55aa77..eab0eb1 100644
--- a/compat-27.1.el
+++ b/compat-27.1.el
@@ -123,6 +123,9 @@ bindings, used when nothing else in the keymap applies; 
this makes it
 usable as a general function for probing keymaps.  However, if the
 third optional argument ACCEPT-DEFAULT is non-nil, `lookup-key' will
 recognize the default bindings, just as `read-key-sequence' does."
+  :cond (condition-case err
+            (lookup-key '(x) nil)
+          (wrong-type-argument (equal err '(keymapp (x)))))
   (cond
    ((keymapp keymap)
     (funcall oldfun keymap key accept-default))



reply via email to

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