emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/embark 9add9248b4 1/2: Better match text properties of


From: ELPA Syncer
Subject: [elpa] externals/embark 9add9248b4 1/2: Better match text properties of real occur buffers
Date: Sun, 28 Jan 2024 15:57:50 -0500 (EST)

branch: externals/embark
commit 9add9248b404e808a32f13e99dbad27f0eb18d6a
Author: Omar Antolin Camarena <omar.antolin@gmail.com>
Commit: Omar Antolin Camarena <omar.antolin@gmail.com>

    Better match text properties of real occur buffers
    
    The rear-nonsticky property was letting users edit the headers, as
    reported by @jdtsmith in #697.
---
 embark-consult.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/embark-consult.el b/embark-consult.el
index fa967cd3b8..57248ef0f5 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -124,22 +124,25 @@ The elements of LINES are assumed to be values of 
category `consult-line'."
                                  'read-only t
                                  'occur-target loc
                                  'follow-link t
-                                 'help-echo mouse-msg))
+                                 'help-echo mouse-msg
+                                 'font-lock-face 'shadow
+                                 'mouse-face 'highlight))
              (contents (propertize (embark-consult--strip line)
                                    'occur-target loc
                                    'occur-match t
                                    'follow-link t
-                                   'help-echo mouse-msg))
+                                   'help-echo mouse-msg
+                                   'mouse-face 'highlight))
              (nl (propertize "\n" 'occur-target loc))
              (this-buf (marker-buffer loc)))
           (unless (eq this-buf last-buf)
             (insert (propertize
                      (format "lines from buffer: %s\n" this-buf)
                      'face list-matching-lines-buffer-name-face
-                     'read-only t
-                     'rear-nonsticky '(read-only)))
+                     'read-only t))
             (setq last-buf this-buf))
-          (insert (concat lineno contents nl))))
+          (let ((inhibit-read-only t))
+            (insert (concat lineno contents nl)))))
       (goto-char (point-min))
       (occur-mode))
     (pop-to-buffer buf)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]