emacs-diffs
[Top][All Lists]
Advanced

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

master 3c01060c023: ; Eglot: simplify last change to eglot-unregister-ca


From: João Távora
Subject: master 3c01060c023: ; Eglot: simplify last change to eglot-unregister-capability
Date: Thu, 8 Jun 2023 21:12:49 -0400 (EDT)

branch: master
commit 3c01060c02359e5b813979b7b950bf904c87dcfa
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    ; Eglot: simplify last change to eglot-unregister-capability
    
    * lisp/progmodes/eglot.el (eglot-unregister-capability): Simplify.
---
 lisp/progmodes/eglot.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index c5a58d7ace6..7d5d786dea3 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -3586,11 +3586,10 @@ at point.  With prefix argument, prompt for 
ACTION-KIND."
   (server (_method (eql workspace/didChangeWatchedFiles)) id)
   "Handle dynamic unregistration of workspace/didChangeWatchedFiles."
   (maphash (lambda (dir watch-and-ids)
-             (when (member id (cdr watch-and-ids))
-               (setcdr watch-and-ids (delete id (cdr watch-and-ids)))
-               (when (null (cdr watch-and-ids))
-                 (file-notify-rm-watch (car watch-and-ids))
-                 (remhash dir (eglot--file-watches server)))))
+             (setcdr watch-and-ids (delete id (cdr watch-and-ids)))
+             (when (null (cdr watch-and-ids))
+               (file-notify-rm-watch (car watch-and-ids))
+               (remhash dir (eglot--file-watches server))))
            (eglot--file-watches server))
   (list t "OK"))
 



reply via email to

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