emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 4496657 34/54: Close #393: use completing-read in


From: João Távora
Subject: [elpa] externals/eglot 4496657 34/54: Close #393: use completing-read in eglot-code-actions
Date: Thu, 16 Apr 2020 05:31:50 -0400 (EDT)

branch: externals/eglot
commit 44966572d2bb3f32a2e41abfb034198e4846c2c8
Author: Theodor Thornhill <address@hidden>
Commit: João Távora <address@hidden>

    Close #393: use completing-read in eglot-code-actions
    
    See also #386.
    
    * eglot.el (eglot-code-actions): Replace tmm with completing-read
    
    Copyright-paperwork-exempt: yes
    Co-authored-by: João Távora <address@hidden>
---
 eglot.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/eglot.el b/eglot.el
index 0d2433e..d1ff7da 100644
--- a/eglot.el
+++ b/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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]