branch: externals/compat
commit f820d796897ff564abd4d7830a71d060e82d5021
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
compat-29: Use when-let
---
compat-29.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/compat-29.el b/compat-29.el
index 6250a896e5..80588e0910 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -776,9 +776,8 @@ The binding is probably a symbol with a function definition.
If optional argument ACCEPT-DEFAULT is non-nil, recognize default
bindings; see the description of `keymap-lookup' for more details
about this."
- (let ((map (current-local-map)))
- (when map
- (keymap-lookup map keys accept-default))))
+ (when-let ((map (current-local-map)))
+ (keymap-lookup map keys accept-default)))
(compat-defun keymap-global-lookup (keys &optional accept-default _message) ;;
<UNTESTED>
"Return the binding for command KEYS in current global keymap only.