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

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

[nongnu] elpa/git-commit 5589aede70 03/10: magit-insert-section--finish:


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 5589aede70 03/10: magit-insert-section--finish: Add all properties in one go
Date: Fri, 3 May 2024 21:59:59 -0400 (EDT)

branch: elpa/git-commit
commit 5589aede70d4926f92cc5ce1e95854df813e64dd
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    magit-insert-section--finish: Add all properties in one go
---
 lisp/magit-section.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 9b67f3e944..b0c6c4ac06 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -1445,7 +1445,9 @@ anything this time around.
                    (if magit-section-inhibit-markers
                        (point)
                      (point-marker))))
-        (map (symbol-value (oref obj keymap))))
+        (props `( magit-section ,obj
+                  ,@(and-let* ((map (symbol-value (oref obj keymap))))
+                      (list 'keymap map)))))
     (unless magit-section-inhibit-markers
       (set-marker-insertion-type beg t))
     (save-excursion
@@ -1455,9 +1457,7 @@ anything this time around.
                          (point) 'magit-section)
                         end)))
           (unless (magit-section-at)
-            (put-text-property (point) next 'magit-section obj)
-            (when map
-              (put-text-property (point) next 'keymap map)))
+            (add-text-properties (point) next props))
           (magit-section-maybe-add-heading-map obj)
           (goto-char next))))
     (cond ((eq obj magit-root-section)



reply via email to

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