Minor logic simplification

This commit is contained in:
Basil L. Contovounesios 2018-02-02 19:02:05 +00:00
parent b37d082297
commit 9f9b522faf
No known key found for this signature in database
GPG key ID: 205AB54A5D5D8CFF

View file

@ -105,8 +105,7 @@ the default action in the list and the remaining elements are the
actions (a key, a function, and a name for each action)." actions (a key, a function, and a name for each action)."
(let (index) (let (index)
(if (integerp action-item) (if (integerp action-item)
(when (and (> action-item 0) (when (< 0 action-item (length action-list))
(< action-item (length action-list)))
(setq index action-item)) (setq index action-item))
(setq index (cl-position-if (setq index (cl-position-if
(cond (cond