branch: elpa/aidermacs commit 8a039d51374cd40ac835cb21e40e33f6a53fe921 Merge: 8242500f4e 439a2c7d71 Author: Kang Tu <tni...@gmail.com> Commit: GitHub <nore...@github.com>
Merge pull request #5 from AmaiKinono/custom-aider-program feat: custom option of aider program --- aider.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/aider.el b/aider.el index 199be5aa03..f4511a610d 100644 --- a/aider.el +++ b/aider.el @@ -20,6 +20,11 @@ :prefix "aider-" :group 'convenience) +(defcustom aider-program "aider" + "The name or path of the aider program." + :type 'string + :group 'aider) + (defcustom aider-args '("--model" "gpt-4o-mini") "Arguments to pass to the Aider command." :type '(repeat string) @@ -86,12 +91,11 @@ If not in a git repository, an error is raised." (defun aider-run-aider () "Create a comint-based buffer and run \"aider\" for interactive conversation." (interactive) - (let* ((buffer-name (aider-buffer-name)) - (command "aider")) + (let* ((buffer-name (aider-buffer-name))) ;; Check if the buffer already has a running process (unless (comint-check-proc buffer-name) ;; Create a new comint buffer and start the process - (apply 'make-comint-in-buffer "aider" buffer-name command nil aider-args) + (apply 'make-comint-in-buffer "aider" buffer-name aider-program nil aider-args) ;; Optionally, you can set the mode or add hooks here (with-current-buffer buffer-name (comint-mode)