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

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

[nongnu] elpa/aidermacs 1389589e61 054/466: refactor: simplify aider-rea


From: ELPA Syncer
Subject: [nongnu] elpa/aidermacs 1389589e61 054/466: refactor: simplify aider-read-string function by removing unnecessary newline handling
Date: Sat, 15 Mar 2025 19:10:58 -0400 (EDT)

branch: elpa/aidermacs
commit 1389589e61e6d53b02e969dcaf56614af821fa37
Author: Kang Tu <kang_tu@apple.com>
Commit: Kang Tu (aider) <kang_tu@apple.com>

    refactor: simplify aider-read-string function by removing unnecessary 
newline handling
---
 aider.el | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/aider.el b/aider.el
index acb07917e8..94ab272b97 100644
--- a/aider.el
+++ b/aider.el
@@ -26,12 +26,7 @@
 (defun aider-read-string (prompt &optional initial-input)
   "Read a string from the user with PROMPT and optional INITIAL-INPUT.
 This function can be customized or redefined by the user."
-  (let ((input (read-string prompt initial-input)))
-    ;; Replace all newline characters with spaces, except for the last one
-    (setq input (replace-regexp-in-string "\n" " " input))
-    (when (string-match-p "\n" input)
-      (setq input (concat (string-trim input) "\n"))) ;; Add a newline at the 
end
-    input))
+  (read-string prompt initial-input))
 
 ;; Transient menu for Aider commands
 (transient-define-prefix aider-transient-menu ()



reply via email to

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