diff --git a/gptel-transient.el b/gptel-transient.el index dc7b8716..d7971fc0 100644 --- a/gptel-transient.el +++ b/gptel-transient.el @@ -599,10 +599,9 @@ Or in an extended conversation: ((member "m" args) (read-string (format "Ask %s: " (gptel-backend-name gptel-backend)) - (apply #'buffer-substring-no-properties - (if (use-region-p) - (list (region-beginning) (region-end)) - (list (line-beginning-position) (line-end-position)))))) + (and (use-region-p) + (buffer-substring-no-properties + (region-beginning) (region-end))))) ((member "y" args) (unless (car-safe kill-ring) (user-error "`kill-ring' is empty! Nothing to send"))