branch: elpa/cider
commit ff44b5b6f5ecb4bc3407fdc07eb54a3e8dc663fd
Author: Oleksandr Yakushev <a...@bytopia.org>
Commit: Oleksandr Yakushev <a...@bytopia.org>

    [nrepl-client] Fix nrepl--eval-request sending duplicate info
    
    Addresses #3831.
---
 CHANGELOG.md    |  8 ++++++++
 nrepl-client.el | 19 +++++++++----------
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 09dd7645595..03e8ed56046 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,14 @@
 
 ## master (unreleased)
 
+### New features
+
+### Changes
+
+### Bugs fixed
+
+- [#3832](https://github.com/clojure-emacs/cider/issues/3832): Fix 
nrepl--eval-request sending duplicate info.
+
 ## 1.19.0 (2025-07-10)
 
 ### New features
diff --git a/nrepl-client.el b/nrepl-client.el
index f056ff8b214..d4374974cf2 100644
--- a/nrepl-client.el
+++ b/nrepl-client.el
@@ -1025,16 +1025,15 @@ Register CALLBACK as the response handler."
 NS provides context for the request.
 If LINE and COLUMN are non-nil and current buffer is a file buffer, \"line\",
 \"column\" and \"file\" are added to the message."
-  (nconc (and ns `("ns" ,ns))
-         `("op" "eval"
-           "code" ,(substring-no-properties input))
-         (when cider-enlighten-mode
-           '("enlighten" "true"))
-         (let ((file (or (buffer-file-name) (buffer-name))))
-           (when (and line column file)
-             `("file" ,file
-               "line" ,line
-               "column" ,column)))))
+  `("op" "eval"
+    "code" ,(substring-no-properties input)
+    ,@(when ns `("ns" ,ns))
+    ,@(when cider-enlighten-mode '("enlighten" "true"))
+    ,@(let ((file (or (buffer-file-name) (buffer-name))))
+        (when (and line column file)
+          `("file" ,file
+            "line" ,line
+            "column" ,column)))))
 
 (defun nrepl-request:eval (input callback connection &optional ns line column 
additional-params tooling)
   "Send the request INPUT and register the CALLBACK as the response handler.

Reply via email to