From 234bbd10321cb668df253323a9033cf692642c0c Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Thu, 2 Jan 2020 10:33:26 +0100 Subject: [PATCH] Use completing-read in eglot-code-actions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit See also https://github.com/joaotavora/eglot/issues/386. * eglot.el (eglot-code-actions): Replace tmm with completing-read Copyright-paperwork-exempt: yes Co-authored-by: João Távora GitHub-reference: close https://github.com/joaotavora/eglot/issues/393 --- lisp/progmodes/eglot.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 0d2433e9c05..d1ff7da5d9c 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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)) -- 2.39.2