emacs-diffs
[Top][All Lists]
Advanced

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

feature/eglot2emacs bef332a983 101/120: Adjust last commit about workspa


From: João Távora
Subject: feature/eglot2emacs bef332a983 101/120: Adjust last commit about workspace configuration
Date: Thu, 20 Oct 2022 07:17:07 -0400 (EDT)

branch: feature/eglot2emacs
commit bef332a98314c5cbd76cce79ee0a60cb6aa94172
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Adjust last commit about workspace configuration
    
    * 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 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index f02ec73043..ff94d5ca5f 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -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)))))
 



reply via email to

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