diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-21 10:43:45 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-21 11:01:43 +0100 |
| commit | f74574e3e289a42e4eac62f8b5e1e66d371e29b4 (patch) | |
| tree | e67d2d55eaec07ec91027b5a25bb7aaa9cfd5254 /compat-27.el | |
| parent | ffb28c74428c77a2dce2513e70b04e79d9a10605 (diff) | |
Minor stylistic improvements
Diffstat (limited to 'compat-27.el')
| -rw-r--r-- | compat-27.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compat-27.el b/compat-27.el index 672a1d0..01af37d 100644 --- a/compat-27.el +++ b/compat-27.el @@ -102,8 +102,8 @@ Letter-case is significant, but text properties are ignored." ((listp keymap) (catch 'found (dolist (map keymap) - (let ((fn (lookup-key map key accept-default))) - (when fn (throw 'found fn)))))) + (when-let ((fn (lookup-key map key accept-default))) + (throw 'found fn))))) ((signal 'wrong-type-argument (list 'keymapp keymap))))) ;;;; Defined in timefns.c @@ -322,10 +322,9 @@ that was current when the minibuffer was activated." When used in a minibuffer window, select the window selected just before the minibuffer was activated, and execute the forms." (declare (indent 0) (debug t)) - `(let ((window (minibuffer-selected-window))) - (when window - (with-selected-window window - ,@body)))) + `(when-let ((window (minibuffer-selected-window))) + (with-selected-window window + ,@body))) ;;;; Defined in image.el |
