branch: elpa/aidermacs commit 439a2c7d71721275cc4463c8e324437809a05a92 Author: AmaiKinono <amaikin...@gmail.com> Commit: AmaiKinono <amaikin...@gmail.com>
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 59631b8cfe..12632e9457 100644 --- a/aider.el +++ b/aider.el @@ -18,6 +18,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) @@ -81,12 +86,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)