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

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

[nongnu] elpa/git-commit 7a94132 6/8: Rename magit-keep-region-overlay t


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 7a94132 6/8: Rename magit-keep-region-overlay to magit-section-keep-region-overlay
Date: Tue, 12 Oct 2021 14:57:48 -0400 (EDT)

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

    Rename magit-keep-region-overlay to magit-section-keep-region-overlay
---
 lisp/git-rebase.el    | 2 +-
 lisp/magit-section.el | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el
index 6a8a777..8ffe5ee 100644
--- a/lisp/git-rebase.el
+++ b/lisp/git-rebase.el
@@ -443,7 +443,7 @@ current line."
     (when bounds
       (magit-section-make-overlay (car bounds) (cadr bounds)
                                   'magit-section-heading-selection))
-    (if (and bounds (not magit-keep-region-overlay))
+    (if (and bounds (not magit-section-keep-region-overlay))
         (funcall (default-value 'redisplay-unhighlight-region-function) rol)
       (funcall (default-value 'redisplay-highlight-region-function)
                start end window rol))))
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index a0ec82d..50cbbc5 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -184,7 +184,9 @@ Otherwise the value has to have one of these two forms:
                                 (const :tag "Yes (potentially slow)" t)
                                 (const :tag "No (kinda ugly)" nil)))))
 
-(defcustom magit-keep-region-overlay nil
+(define-obsolete-variable-alias 'magit-keep-region-overlay
+  'magit-section-keep-region-overlay "Magit-Section 3.4.0")
+(defcustom magit-section-keep-region-overlay nil
   "Whether to keep the region overlay when there is a valid selection.
 
 By default Magit removes the regular region overlay if, and only
@@ -1320,7 +1322,7 @@ invisible."
 (defun magit-section-make-overlay (start end face)
   ;; Yes, this doesn't belong here.  But the alternative of
   ;; spreading this hack across the code base is even worse.
-  (when (and magit-keep-region-overlay
+  (when (and magit-section-keep-region-overlay
              (memq face '(magit-section-heading-selection
                           magit-diff-file-heading-selection
                           magit-diff-hunk-heading-selection)))
@@ -1375,7 +1377,7 @@ invisible."
 
 (defun magit-section--highlight-region (start end window rol)
   (magit-section--delete-region-overlays)
-  (if (and (not magit-keep-region-overlay)
+  (if (and (not magit-section-keep-region-overlay)
            (or (magit-region-sections)
                (run-hook-with-args-until-success 'magit-region-highlight-hook
                                                  (magit-current-section)))



reply via email to

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