gptel-transient: Remove "-ts" suffix from major mode (#259)
gptel-transient (gptel--rewrite-message): Remove "-ts" suffix from major mode.
This commit is contained in:
parent
5d069cfca8
commit
9bc54bed9c
1 changed files with 3 additions and 1 deletions
|
@ -101,7 +101,9 @@ Or is it the other way around?"
|
||||||
"Set a generic refactor/rewrite message for the buffer."
|
"Set a generic refactor/rewrite message for the buffer."
|
||||||
(if (derived-mode-p 'prog-mode)
|
(if (derived-mode-p 'prog-mode)
|
||||||
(format "You are a %s programmer. Refactor the following code. Generate only code, no explanation."
|
(format "You are a %s programmer. Refactor the following code. Generate only code, no explanation."
|
||||||
(substring (symbol-name major-mode) nil -5))
|
(thread-last (symbol-name major-mode)
|
||||||
|
(string-remove-suffix "-mode")
|
||||||
|
(string-remove-suffix "-ts")))
|
||||||
(format "You are a prose editor. Rewrite the following text to be more professional.")))
|
(format "You are a prose editor. Rewrite the following text to be more professional.")))
|
||||||
|
|
||||||
(defvar gptel--crowdsourced-prompts-url
|
(defvar gptel--crowdsourced-prompts-url
|
||||||
|
|
Loading…
Add table
Reference in a new issue