branch: elpa/magit
commit 3dc5669fdf8c0f0be4f48ef15a8b4dc48801549d
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-describe-section-briefly: Improve ergonomics
---
lisp/magit-section.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 0c0b31dfc7b..a2cdef9d06f 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -1117,12 +1117,15 @@ silently ignored."
;;;; Auxiliary
-(defun magit-describe-section-briefly (section &optional ident interactive)
- "Show information about the section at point.
+(defun magit-describe-section-briefly (&optional section ident interactive)
+ "Show information about SECTION or the section at point.
With a prefix argument show the section identity instead of the
section lineage. This command is intended for debugging purposes.
-\n(fn SECTION &optional IDENT)"
+Non-interactively, just return the information. Interactively,
+or when INTERACTIVE is non-nil, show the section in the echo area."
(interactive (list (magit-current-section) current-prefix-arg t))
+ (unless section
+ (setq section (magit-current-section)))
(let ((str (format "#<%s %S %S %s-%s%s>"
(eieio-object-class section)
(let ((val (oref section value)))