branch: externals/compat
commit 598a040bb0988f5d6cd930fcc1e59ee98703ec6a
Author: Philip Kaludercic <phil...@posteo.net>
Commit: Philip Kaludercic <phil...@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