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

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

[nongnu] elpa/gptel 6d3e4a99f5 236/273: gptel-transient: Rename addition


From: ELPA Syncer
Subject: [nongnu] elpa/gptel 6d3e4a99f5 236/273: gptel-transient: Rename additional-directive functions
Date: Wed, 1 May 2024 10:02:40 -0400 (EDT)

branch: elpa/gptel
commit 6d3e4a99f53e9983fff3952f533145df1ae343b9
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>

    gptel-transient: Rename additional-directive functions
    
    * gptel-transient.el (gptel--get-directive,
    gptel--infix-add-directive, gptel-menu): Rename the
    directive-related functions to be shorter/more consistent with the
    rest of the code.
    
    gptel--additional-directive     -> gptel--infix-add-directive
    gptel--additional-directive-get -> gptel--get-directive
---
 gptel-transient.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gptel-transient.el b/gptel-transient.el
index 5ee26ee22f..a1b18c6304 100644
--- a/gptel-transient.el
+++ b/gptel-transient.el
@@ -124,7 +124,7 @@ which see."
    [""
     "Instructions"
     ("s" "Set system message" gptel-system-prompt :transient t)
-    (gptel--additional-directive :if (lambda () gptel-expert-commands))]]
+    (gptel--infix-add-directive :if (lambda () gptel-expert-commands))]]
   [["Model Parameters"
     (gptel--infix-provider)
     ;; (gptel--infix-model)
@@ -185,7 +185,7 @@ which see."
      (lambda ()
        "Inspect the query that will be sent as a lisp object."
        (interactive)
-       (let* ((extra (gptel--additional-directive-get
+       (let* ((extra (gptel--get-directive
                       (transient-args
                        transient-current-command)))
               (gptel--system-message
@@ -196,7 +196,7 @@ which see."
      (lambda ()
        "Inspect the query that will be sent as a JSON object."
        (interactive)
-       (let* ((extra (gptel--additional-directive-get
+       (let* ((extra (gptel--get-directive
                       (transient-args
                        transient-current-command)))
               (gptel--system-message
@@ -477,7 +477,7 @@ Also format its value in the Transient menu."
        (concat "(" (symbol-name (oref obj display-nil)) ")")
        'face 'transient-inactive-value))))
 
-(transient-define-infix gptel--additional-directive ()
+(transient-define-infix gptel--infix-add-directive ()
   "Additional directive intended for the next query only.
 
 This is useful to define a quick task on top of a more extensive
@@ -507,7 +507,7 @@ Or in an extended conversation:
   :description "Add directive"
   :transient t)
 
-(defun gptel--additional-directive-get (args)
+(defun gptel--get-directive (args)
   "Find the additional directive in the transient ARGS of this command."
   (cl-some (lambda (s) (and (string-prefix-p ":" s)
                        (concat "\n\n" (substring s 1))))
@@ -546,7 +546,7 @@ Or in an extended conversation:
         (backend-name (gptel-backend-name gptel-backend))
         (buffer) (position)
         (callback) (gptel-buffer-name)
-        (system-extra (gptel--additional-directive-get args))
+        (system-extra (gptel--get-directive args))
         ;; Input redirection: grab prompt from elsewhere?
         (prompt
          (cond



reply via email to

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