1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-06 22:31:13 -07:00

grep-edit--prepare-buffer: Fix allowed insertion positions

* lisp/progmodes/grep.el (grep-edit--prepare-buffer): Fix allowed
insertion positions, like previously in xref-edit--prepare-buffer.
This commit is contained in:
Dmitry Gutov 2026-04-03 04:38:59 +03:00
parent 956e77f9dd
commit 9d5a24cfac

View file

@ -1089,11 +1089,15 @@ list is empty)."
match)
(while (setq match (text-property-search-forward 'compilation-annotation))
(add-text-properties (prop-match-beginning match) (prop-match-end match)
'(read-only t)))
'(read-only t front-sticky t)))
(goto-char (point-min))
(while (setq match (text-property-search-forward 'compilation-message))
(add-text-properties (prop-match-beginning match) (prop-match-end match)
'(read-only t occur-prefix t))
'( read-only t occur-prefix t
;; Allow insertion of text right
;; after prefix, but not before.
front-sticky t
rear-nonsticky t))
(let ((loc (compilation--message->loc (prop-match-value match)))
m)
;; Update the markers if necessary.