branch: elpa/gptel
commit 09889046c2da152ab9b849d3cb3df3cbd6cd1904
Author: Kevin Montag <[email protected]>
Commit: GitHub <[email protected]>

    gptel: Propagate setter to parent presets (#1188)
    
    gptel.el (gptel--apply-preset): Apply parent presets with the same `setter'
    used for the preset itself.  When applying a preset buffer-locally, for 
example,
    any `:parents' of the preset are now applied buffer-locally as well.
---
 gptel.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gptel.el b/gptel.el
index da22217f7a2..b9e38e513a8 100644
--- a/gptel.el
+++ b/gptel.el
@@ -2134,7 +2134,7 @@ example) apply the preset buffer-locally."
   (unless setter (setq setter #'set))
   (when-let* ((func (plist-get preset :pre))) (funcall func))
   (when-let* ((parents (plist-get preset :parents)))
-    (mapc #'gptel--apply-preset (ensure-list parents)))
+    (mapc (lambda (parent) (gptel--apply-preset parent setter)) (ensure-list 
parents)))
   (map-do
    (lambda (key val)
      (pcase key

Reply via email to