branch: elpa/gptel
commit fdc604710ba07a31a5cc9c18bdaea3447c1356e2
Author: Karthik Chikmagalur <[email protected]>
Commit: Karthik Chikmagalur <[email protected]>
gptel: Handle face spec incompatibility for Emacs 27 and 28
* gptel-request.el: Add note to remove `gptel--temp-buffer' after
dropping support for Emacs 27.
* gptel.el (gptel-response-fringe-highlight): Add note to simplify
its definition after removing support for Emacs 27 and 28. (#1254)
---
gptel-request.el | 1 +
gptel.el | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gptel-request.el b/gptel-request.el
index d023d7989a..a9ef8811e7 100644
--- a/gptel-request.el
+++ b/gptel-request.el
@@ -922,6 +922,7 @@ MODE-SYM is typically a major-mode symbol."
(skip-syntax-forward "w.")
,(macroexp-progn body)))
+;; NOTE: Remove after we drop Emacs 27.1 (#724)
(defmacro gptel--temp-buffer (buf)
"Generate a temp buffer BUF.
diff --git a/gptel.el b/gptel.el
index cced91d593..d256448944 100644
--- a/gptel.el
+++ b/gptel.el
@@ -966,7 +966,10 @@ To enable this face for responses,
`gptel-highlight-methods' must be set."
:group 'gptel)
(defface gptel-response-fringe-highlight
- '((t :inherit outline-1 :height reset))
+ ;; NOTE: Remove conditional after we drop Emacs 28.1 (#1254)
+ (if (< emacs-major-version 29)
+ '((t :inherit outline-1 :height 1.0))
+ '((t :inherit outline-1 :height reset)))
"LLM response fringe/margin face when using `gptel-highlight-mode'.
To enable response highlights in the fringe, `gptel-highlight-methods'