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

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

[elpa] externals/eglot 6689a15 026/139: Add eglot-clear-status interacti


From: João Távora
Subject: [elpa] externals/eglot 6689a15 026/139: Add eglot-clear-status interactive command
Date: Mon, 14 May 2018 09:54:47 -0400 (EDT)

branch: externals/eglot
commit 6689a1588366a5d461207b11130b167e14a1dcf4
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Add eglot-clear-status interactive command
    
    * eglot.el (eglot-clear-status): New
    (eglot-forget-pending-continuations): Fix bug.
    (eglot--mode-line-format): Add link to eglot-clear-status.
---
 eglot.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/eglot.el b/eglot.el
index 1a82cc5..db594f4 100644
--- a/eglot.el
+++ b/eglot.el
@@ -361,9 +361,14 @@ identifier.  ERROR is non-nil if this is an error."
 
 (defun eglot-forget-pending-continuations (process)
   "Stop waiting for responses from the current LSP PROCESS."
-  (interactive (eglot--current-process-or-lose))
+  (interactive (list (eglot--current-process-or-lose)))
   (clrhash (eglot--pending-continuations process)))
 
+(defun eglot-clear-status (process)
+  "Clear most recent error message from PROCESS."
+  (interactive (list (eglot--current-process-or-lose)))
+  (setf (eglot--status process) nil))
+
 (cl-defun eglot--request (process
                           method
                           params
@@ -668,12 +673,15 @@ running.  INTERACTIVE is t if called interactively."
              `("/"
                (:propertize
                 ,status
-                help-echo ,(concat "mouse-1: go to events buffer")
+                help-echo ,(concat "mouse-1: go to events buffer\n"
+                                   "mouse-3: clear this status")
                 mouse-face mode-line-highlight
                 face compilation-mode-line-fail
                 keymap ,(let ((map (make-sparse-keymap)))
                           (define-key map [mode-line mouse-1]
                             'eglot-events-buffer)
+                          (define-key map [mode-line mouse-3]
+                            'eglot-clear-status)
                           map))))
          ,@(when (and doing (not done-p))
              `("/"



reply via email to

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