mu4e--main-action: guard against nil ALT argument

Otherwise, if ALT is not provided the initial binding of bindstr can fail with:
Wrong type argument: characterp, nil
This commit is contained in:
Nicholas Vollmer 2023-02-23 09:13:38 -05:00
parent 558745bf00
commit 45ecfebce5
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ use ALT as a substitute.
If the first letter after the [@] is equal to the last letter of the
binding representation, remove that first letter."
(let* ((bindstr (or bindstr (mu4e-key-description cmd) (string alt)
(let* ((bindstr (or bindstr (mu4e-key-description cmd) (and alt (string alt))
(mu4e-error "No binding for %s" cmd)))
(bindstr
(if (and alt (> (length bindstr) 1)) alt bindstr))