branch: elpa/gptel
commit 2da449ebade2425fbf43e5648350e7a907462a18
Author: Henrik Ahlgren <[email protected]>
Commit: GitHub <[email protected]>

    gptel-transient: Fix read-only behaviour in gptel--edit-directive (#622)
    
    * gptel-transient.el (gptel--edit-directive): Ensure that the example
    comment or provided prompt is fully read-only (before and after). Drop
    comment about `make-separator-line'.
---
 gptel-transient.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gptel-transient.el b/gptel-transient.el
index fb91a3c870..ae7f2e5a73 100644
--- a/gptel-transient.el
+++ b/gptel-transient.el
@@ -1361,10 +1361,8 @@ setting up the buffer."
               "# Example: You are a poet. Reply only in verse."))
          "\n\n")
         (add-text-properties
-         (point-min) (1- (point))
-         (list 'read-only t 'face 'font-lock-comment-face))
-        ;; TODO: make-separator-line requires Emacs 28.1+.
-        ;; (insert (propertize (make-separator-line) 'rear-nonsticky t))
+         (point-min) (point)
+         (list 'read-only t 'face 'font-lock-comment-face 'front-sticky t 
'rear-nonsticky t))
         (set-marker msg-start (point))
         (save-excursion
           ;; If it's a list, insert only the system message part

Reply via email to