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

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

[nongnu] elpa/git-commit 7c45ae83ac 08/12: Add magit-process-unset-mode-


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 7c45ae83ac 08/12: Add magit-process-unset-mode-line-error-status to hook
Date: Fri, 13 May 2022 10:58:11 -0400 (EDT)

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

    Add magit-process-unset-mode-line-error-status to hook
    
    No longer hardcode it in `magit-refresh-buffer'.
    This helps avoiding circular dependencies.
---
 lisp/magit-mode.el    | 1 -
 lisp/magit-process.el | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 8eb4bc83a8..b0ac4671c5 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1097,7 +1097,6 @@ Run hooks `magit-pre-refresh-hook' and 
`magit-post-refresh-hook'."
         (setq magit-section-highlight-overlays nil)
         (setq magit-section-highlighted-sections nil)
         (setq magit-section-unhighlight-sections nil)
-        (magit-process-unset-mode-line-error-status)
         (let ((inhibit-read-only t))
           (erase-buffer)
           (save-excursion
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index 38eacd43d0..6dd347a0c1 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -1043,6 +1043,9 @@ If STR is supplied, it replaces the `mode-line-process' 
text."
                    'magit-mode-line-process-error))
       (magit-process-unset-mode-line))))
 
+(add-hook 'magit-refresh-buffer-hook
+          #'magit-process-unset-mode-line-error-status)
+
 (defun magit-process-unset-mode-line (&optional directory)
   "Remove the git command from the mode line."
   (let ((default-directory (or directory default-directory)))



reply via email to

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