[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/aidermacs b2230e3c2d 2/3: fix naming
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/aidermacs b2230e3c2d 2/3: fix naming |
Date: |
Sat, 15 Mar 2025 22:01:52 -0400 (EDT) |
branch: elpa/aidermacs
commit b2230e3c2dba6b88c5cd5f7e009726e94bd74b49
Author: reindert <info@codesensei.nl>
Commit: reindert <info@codesensei.nl>
fix naming
---
aidermacs-backend-vterm.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/aidermacs-backend-vterm.el b/aidermacs-backend-vterm.el
index 7ecf8f7b05..cd6a71894d 100644
--- a/aidermacs-backend-vterm.el
+++ b/aidermacs-backend-vterm.el
@@ -151,12 +151,12 @@ Use BUFFER if provided, otherwise retrieve it from
`aidermacs-get-buffer-name'."
(cancel-timer aidermacs--vterm-active-timer)
(setq aidermacs--vterm-active-timer nil)))))
-(defcustom aidermacs-use-theme-colors t
+(defcustom aidermacs-vterm-use-theme-colors t
"Whether to use emacs theme colors for aider. Has effect only
when using the vterm backend."
:type 'boolean)
-(defcustom aidermacs-theme-colors-plist
+(defcustom aidermacs-vterm-theme-colors-plist
'("--user-input-color" font-lock-function-name-face
"--assistant-output-color" default
"--tool-error-color" error
@@ -165,17 +165,17 @@ when using the vterm backend."
arguments to send to aider. Values are either faces or strings (colours like
\"#00cc00\")"
:type 'plist)
-(defun aidermacs--colorname-to-rgb (name)
+(defun aidermacs--vterm-colorname-to-rgb (name)
"Convert emacs color names to RGB values."
(if-let ((colors (color-values name)))
(concat "#"
(mapconcat (lambda (c) (format "%02X" (/ c 256))) colors))
(face-attribute 'default :foreground)))
-(defun aidermacs--theme-args ()
+(defun aidermacs--vterm-theme-args ()
"Create arguments for aider to try and match the current emacs theme.
See `aidermacs-theme-colors-plist'."
- (if aidermacs-use-theme-colors
+ (if aidermacs-vterm-use-theme-colors
(mapcar (lambda (s)
(cond ((stringp s)
(if (string-prefix-p "-" s) s
@@ -187,9 +187,9 @@ See `aidermacs-theme-colors-plist'."
(face-attribute 'default
:foreground))))
(if (string-prefix-p "#" color-string)
color-string
- (aidermacs--colorname-to-rgb color-string)))))
+ (aidermacs--vterm-colorname-to-rgb
color-string)))))
(t (error "Invalid face or colour value: %s" s))))
- aidermacs-theme-colors-plist)
+ aidermacs-vterm-theme-colors-plist)
(if (eq (frame-parameter nil 'background-mode) 'dark)
'("--dark-mode")
'("--light-mode"))))
@@ -201,7 +201,7 @@ BUFFER-NAME is the name for the vterm buffer."
(unless (require 'vterm nil t)
(error "Vterm package is not available"))
(unless (get-buffer buffer-name)
- (let* ((cmd (mapconcat #'identity (append `(,program
,@(aidermacs--theme-args)) args) " "))
+ (let* ((cmd (mapconcat #'identity (append `(,program
,@(aidermacs--vterm-theme-args)) args) " "))
(vterm-buffer-name buffer-name)
(vterm-shell cmd))
(with-current-buffer (vterm-other-window)