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

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

[nongnu] elpa/git-commit df2f6e3f5d 01/11: magit-xref-setup: Limit numbe


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit df2f6e3f5d 01/11: magit-xref-setup: Limit number of items
Date: Mon, 13 Mar 2023 14:00:24 -0400 (EDT)

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

    magit-xref-setup: Limit number of items
    
    We already tried to do so but since this call to
    `called-interactively-p' always returned nil, that did not actually
    happen.  We tried to only do it "when called interactively", because
    that is what `help-setup-xref' does.  I see no reason to make this
    distinction here, so trim the history unconditionally.  However
    limiting to just ten items seems too extreme, so limit to 30.
---
 lisp/magit-mode.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index d4b7f18e35..72fc7d2b80 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1299,9 +1299,8 @@ Later, when the buffer is buried, it may be restored by
     (when help-xref-stack-item
       (push (cons (point) help-xref-stack-item) help-xref-stack)
       (setq help-xref-forward-stack nil))
-    (when (called-interactively-p 'interactive)
-      (--when-let (nthcdr 10 help-xref-stack)
-        (setcdr it nil)))
+    (when-let ((tail (nthcdr 30 help-xref-stack)))
+      (setcdr tail nil))
     (setq help-xref-stack-item
           (list 'magit-xref-restore fn default-directory args))))
 



reply via email to

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