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

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

[nongnu] elpa/gptel 09729ee718 089/273: gptel: Create customization grou


From: ELPA Syncer
Subject: [nongnu] elpa/gptel 09729ee718 089/273: gptel: Create customization group
Date: Wed, 1 May 2024 10:01:53 -0400 (EDT)

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

    gptel: Create customization group
    
    gptel.el (gptel-default-mode): Also make `gptel-default-mode' a user
    option.
---
 gptel.el | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gptel.el b/gptel.el
index c87b4cdd15..f9635b777c 100644
--- a/gptel.el
+++ b/gptel.el
@@ -66,6 +66,9 @@
 (require 'map)
 (require 'text-property-search)
 
+(defgroup gptel nil
+  "Interact with ChatGPT from anywhere in Emacs.")
+
 (defcustom gptel-api-key #'gptel-api-key-from-auth-source
   "An OpenAI API key (string).
 
@@ -117,9 +120,15 @@ to ChatGPT. Note: this hook runs even if the request 
fails."
   :type 'hook)
 
 (defvar gptel-default-session "*ChatGPT*")
-(defvar gptel-default-mode (if (featurep 'markdown-mode)
+(defcustom gptel-default-mode (if (featurep 'markdown-mode)
                                'markdown-mode
-                             'text-mode))
+                             'text-mode)
+  "The default major mode for dedicated chat buffers.
+
+If `markdown-mode' is available, it is used. Otherwise gptel
+defaults to `text-mode'."
+  :group 'gptel
+  :type 'symbol)
 
 ;; TODO: Handle `prog-mode' using the `comment-start' variable
 (defcustom gptel-prompt-prefix-alist



reply via email to

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