Fix duplicate backends in +lookup prompts

When running a +lookup/* command with the prefix arg, you are prompted
for which backend to use, which could contain duplicates if the current
buffer has no local backends.
This commit is contained in:
Henrik Lissner 2019-10-03 17:16:06 -04:00
parent 19bfb1285d
commit daee52d358
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -137,8 +137,9 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g.
(if-let*
((handler (intern-soft
(completing-read "Select lookup handler: "
(remq t (append (symbol-value handlers)
(default-value handlers)))
(delete-dups
(remq t (append (symbol-value handlers)
(default-value handlers))))
nil t))))
(+lookup--run-handlers handler identifier origin)
(user-error "No lookup handler selected"))