From: João Távora Date: Fri, 9 Jun 2023 01:11:38 +0000 (+0100) Subject: ; Eglot: simplify last change to eglot-unregister-capability X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3c01060c02359e5b813979b7b950bf904c87dcfa;p=emacs.git ; Eglot: simplify last change to eglot-unregister-capability * lisp/progmodes/eglot.el (eglot-unregister-capability): Simplify. --- 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"))