]> git.eshelyaron.com Git - emacs.git/commitdiff
Adjust last commit about workspace configuration
authorJoão Távora <joaotavora@gmail.com>
Sat, 17 Sep 2022 09:33:26 +0000 (10:33 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sat, 17 Sep 2022 09:33:26 +0000 (10:33 +0100)
* README.md (way): Adjust.

* eglot.el (json): Don't require needlessly.
(eglot-show-workspace-configuration): Don't depend on json-mode.

GitHub-reference: per https://github.com/joaotavora/eglot/issues/790
GitHub-reference: per https://github.com/joaotavora/eglot/issues/590

lisp/progmodes/eglot.el

index f02ec73043c96337987b06032b340bd31e008aee..ff94d5ca5f4c30622b7d68dcf13d7bea5edd837c 100644 (file)
@@ -74,7 +74,6 @@
 (require 'filenotify)
 (require 'ert)
 (require 'array)
-(require 'json)
 
 ;; ElDoc is preloaded in Emacs, so `require'-ing won't guarantee we are
 ;; using the latest version from GNU Elpa when we load eglot.el.  Use an
@@ -2222,8 +2221,7 @@ format described above.")
       (insert (jsonrpc--json-encode conf))
       (with-no-warnings
         (require 'json)
-        (require 'json-mode)
-        (json-mode)
+        (when (require 'json-mode nil t) (json-mode))
         (json-pretty-print-buffer))
       (pop-to-buffer (current-buffer)))))