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

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

[nongnu] elpa/graphql-mode 7aa3532aed 026/122: Don't depend on json-mode


From: ELPA Syncer
Subject: [nongnu] elpa/graphql-mode 7aa3532aed 026/122: Don't depend on json-mode
Date: Sat, 29 Jan 2022 08:03:30 -0500 (EST)

branch: elpa/graphql-mode
commit 7aa3532aedfbec513a10c045cffafbf48420b832
Author: David Vazquez Pua <dvazquezpua@deloitte.nl>
Commit: David Vazquez Pua <dvazquezpua@deloitte.nl>

    Don't depend on json-mode
    
    Switch to json-mode if the mode is available but don't force it as a
    dependency.
    
    This closes #4
    
    Suggested-by: syohex
---
 graphql-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/graphql-mode.el b/graphql-mode.el
index 5f6d5c9a69..6b787d956a 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -4,7 +4,7 @@
 
 ;; Author: David Vazquez Pua <davazp@gmail.com>
 ;; Keywords: languages
-;; Package-Requires: ((emacs "24.3") (json-mode "1.7.0"))
+;; Package-Requires: ((emacs "24.3"))
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -39,7 +39,6 @@
 (require 'newcomment)
 (require 'json)
 (require 'url)
-(require 'json-mode)
 (require 'cl-lib)
 
 (defvar graphql-url
@@ -93,7 +92,8 @@ response from the server."
     (with-current-buffer-window
      "*GraphQL*" 'display-buffer-pop-up-window nil
      (erase-buffer)
-     (json-mode)
+     (when (fboundp 'json-mode)
+       (json-mode))
      (insert response)
      (json-pretty-print-buffer))))
 



reply via email to

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