|
8 | 8 | ;; Benedek Fazekas < [email protected]>
|
9 | 9 | ;; Version: 2.5.0-snapshot
|
10 | 10 | ;; Keywords: convenience, clojure, cider
|
11 |
| -;; Package-Requires: ((emacs "25.1") (seq "2.19") (yasnippet "0.6.1") (paredit "24") (multiple-cursors "1.2.2") (clojure-mode "5.6.1") (cider "0.23.0") (edn "1.1.2") (inflections "2.3") (hydra "0.13.2")) |
| 11 | + |
| 12 | +;; Package-Requires: ((emacs "25.1") (seq "2.19") (yasnippet "0.6.1") (paredit "24") (multiple-cursors "1.2.2") (clojure-mode "5.6.1") (cider "0.23.0") (parseedn "0.1") (inflections "2.3") (hydra "0.13.2")) |
12 | 13 |
|
13 | 14 | ;; This program is free software; you can redistribute it and/or
|
14 | 15 | ;; modify it under the terms of the GNU General Public License
|
@@ -1475,18 +1476,18 @@ Optionally adds :refer [REFER-NAMES] clause."
|
1475 | 1476 | "Returns a list of the function names in STRING-WITH-DEFNS,
|
1476 | 1477 | optionally including those that are declared private."
|
1477 | 1478 | (cljr--with-string-content string-with-defns
|
1478 |
| - (let ((count (paredit-count-sexps-forward)) |
1479 |
| - (names '())) |
1480 |
| - (dotimes (_ count) |
1481 |
| - (paredit-forward-down) |
1482 |
| - (cljr--goto-toplevel) |
1483 |
| - (forward-char) |
1484 |
| - (if (and include-private (looking-at "defn-")) |
1485 |
| - (push (cljr--name-of-current-def) names) |
1486 |
| - (when (looking-at "defn ") |
1487 |
| - (push (cljr--name-of-current-def) names))) |
1488 |
| - (paredit-forward-up)) |
1489 |
| - names))) |
| 1479 | + (let ((count (paredit-count-sexps-forward)) |
| 1480 | + (names '())) |
| 1481 | + (dotimes (_ count) |
| 1482 | + (paredit-forward-down) |
| 1483 | + (cljr--goto-toplevel) |
| 1484 | + (forward-char) |
| 1485 | + (if (and include-private (looking-at "defn-")) |
| 1486 | + (push (cljr--name-of-current-def) names) |
| 1487 | + (when (looking-at "defn ") |
| 1488 | + (push (cljr--name-of-current-def) names))) |
| 1489 | + (paredit-forward-up)) |
| 1490 | + names))) |
1490 | 1491 |
|
1491 | 1492 | (defun cljr--current-namespace ()
|
1492 | 1493 | (save-excursion
|
@@ -1911,7 +1912,7 @@ FEATURE is either :clj or :cljs."
|
1911 | 1912 | cljr--ensure-op-supported
|
1912 | 1913 | cljr--create-msg
|
1913 | 1914 | (cljr--call-middleware-sync "namespace-aliases")
|
1914 |
| - edn-read)) |
| 1915 | + parseedn-read-str)) |
1915 | 1916 |
|
1916 | 1917 | (defun cljr--get-aliases-from-middleware ()
|
1917 | 1918 | (when-let (aliases (cljr--call-middleware-for-namespace-aliases))
|
@@ -2505,7 +2506,7 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-promote-function
|
2505 | 2506 | (unless (cljr--empty-buffer-p)
|
2506 | 2507 | (goto-char (point-min))
|
2507 | 2508 | (while (not (cljr--end-of-buffer-p))
|
2508 |
| - (push (edn-read) occurrences)))) |
| 2509 | + (push (parseedn-read-str) occurrences)))) |
2509 | 2510 | occurrences))
|
2510 | 2511 |
|
2511 | 2512 | (defun cljr--find-symbol (symbol ns callback)
|
@@ -2560,7 +2561,7 @@ root."
|
2560 | 2561 | (when (= cjr--occurrence-count cljr--num-syms)
|
2561 | 2562 | (cljr--finalise-find-symbol-buffer cljr--num-syms)))
|
2562 | 2563 | (when-let (occurrence-data (nrepl-dict-get occurrence-resp "occurrence"))
|
2563 |
| - (let* ((occurrence (edn-read occurrence-data)) |
| 2564 | + (let* ((occurrence (parseedn-read-str occurrence-data)) |
2564 | 2565 | (occurrence-id (format "%s%s"
|
2565 | 2566 | (cljr--get-valid-filename occurrence)
|
2566 | 2567 | (gethash :line-beg occurrence))))
|
@@ -2699,15 +2700,15 @@ Also adds the alias prefix to all occurrences of public symbols in the namespace
|
2699 | 2700 | "used-ns" ns
|
2700 | 2701 | "file" filename))
|
2701 | 2702 | (occurrences (thread-last (cljr--call-middleware-sync request "used-publics")
|
2702 |
| - (edn-read)))) |
| 2703 | + (parseedn-read-str)))) |
2703 | 2704 | (cljr--replace-refer-all-with-alias ns occurrences alias))))
|
2704 | 2705 |
|
2705 | 2706 | (defun cljr--maybe-nses-in-bad-state (response)
|
2706 | 2707 | (let ((asts-in-bad-state (seq-filter
|
2707 | 2708 | (lambda (it)
|
2708 | 2709 | (not (stringp (car (last it)))))
|
2709 | 2710 | (thread-first (nrepl-dict-get response "ast-statuses")
|
2710 |
| - edn-read |
| 2711 | + parseedn-read-str |
2711 | 2712 | (seq-partition 2)))))
|
2712 | 2713 | (when (not (= 0 (length asts-in-bad-state)))
|
2713 | 2714 | (user-error (concat "Some namespaces are in a bad state: "
|
@@ -2890,7 +2891,7 @@ Date. -> Date
|
2890 | 2891 | (with-no-warnings (cider-current-session)))
|
2891 | 2892 | (cljr--call-middleware-sync
|
2892 | 2893 | "candidates")))
|
2893 |
| - (edn-read candidates))) |
| 2894 | + (parseedn-read-str candidates))) |
2894 | 2895 |
|
2895 | 2896 | (defun cljr--get-error-value (response)
|
2896 | 2897 | "Gets the error value from the middleware response.
|
@@ -3070,7 +3071,7 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-stubs"
|
3070 | 3071 | (format "%s/%s" alias? (cljr--symbol-suffix interface))
|
3071 | 3072 | interface)
|
3072 | 3073 | (format "%s/%s" (cider-current-ns) interface)))
|
3073 |
| - (functions (edn-read (cljr--call-middleware-sync |
| 3074 | + (functions (parseedn-read-str (cljr--call-middleware-sync |
3074 | 3075 | (cljr--create-msg "stubs-for-interface"
|
3075 | 3076 | "interface" interface)
|
3076 | 3077 | "functions"))))
|
@@ -3211,7 +3212,7 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-inline-symbol"
|
3211 | 3212 | "name" symbol-name
|
3212 | 3213 | "ignore-errors"
|
3213 | 3214 | (when cljr-ignore-analyzer-errors "true")))
|
3214 |
| - (response (edn-read (cljr--call-middleware-sync |
| 3215 | + (response (parseedn-read-str (cljr--call-middleware-sync |
3215 | 3216 | extract-definition-request "definition")))
|
3216 | 3217 | (definition (gethash :definition response))
|
3217 | 3218 | (occurrences (gethash :occurrences response)))
|
|
0 commit comments