Skip to content

Commit

Permalink
Close joaotavora/eglot#393: use completing-read in eglot-code-actions
Browse files Browse the repository at this point in the history
See also joaotavora/eglot#386.

* eglot.el (eglot-code-actions): Replace tmm with completing-read

Copyright-paperwork-exempt: yes
Co-authored-by: João Távora <[email protected]>
  • Loading branch information
theothornhill and joaotavora committed Jan 2, 2020
1 parent cb567b9 commit c2d4faa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lisp/progmodes/eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -2466,12 +2466,10 @@ potentially rename EGLOT's help buffer."
(menu `("Eglot code actions:" ("dummy" ,@menu-items)))
(action (if (listp last-nonmenu-event)
(x-popup-menu last-nonmenu-event menu)
(let ((never-mind (gensym)) retval)
(setcdr (cadr menu)
(cons `("never mind..." . ,never-mind) (cdadr menu)))
(if (eq (setq retval (tmm-prompt menu)) never-mind)
(keyboard-quit)
retval)))))
(cdr (assoc (completing-read "[eglot] Pick an action: "
menu-items nil t
nil nil (car menu-items))
menu-items)))))
(eglot--dcase action
(((Command) command arguments)
(eglot-execute-command server (intern command) arguments))
Expand Down

0 comments on commit c2d4faa

Please sign in to comment.