branch: elpa/git-commit
commit 831fc8bfbc90a049de6e3d58d5f0e49e9faad1a7
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-section-lineage: Update documentation
---
docs/magit-section.org | 5 +++--
docs/magit-section.texi | 5 +++--
lisp/magit-section.el | 5 ++---
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/docs/magit-section.org b/docs/magit-section.org
index f94ef153e1..f0477f530c 100644
--- a/docs/magit-section.org
+++ b/docs/magit-section.org
@@ -171,10 +171,11 @@ source for suitable examples before asking me for help.
Thanks!
If optional ROOT is non-nil, then search in that section tree
instead of in the one whose root ~magit-root-section~ is.
-- Function: magit-section-lineage section ::
+- Function: magit-section-lineage section &optional raw ::
Return the lineage of SECTION.
- The return value has the form ~(TYPE...)~.
+ If optional RAW is non-nil, return a list of section objects,
+ beginning with SECTION, otherwise return a list of section types.
- Function: magit-section-content-p section ::
diff --git a/docs/magit-section.texi b/docs/magit-section.texi
index f0f4365c76..b59635b440 100644
--- a/docs/magit-section.texi
+++ b/docs/magit-section.texi
@@ -216,9 +216,10 @@ If optional ROOT is non-nil, then search in that section
tree
instead of in the one whose root @code{magit-root-section} is.
@end defun
-@defun magit-section-lineage section
+@defun magit-section-lineage section &optional raw
Return the lineage of SECTION@.
-The return value has the form @code{(TYPE...)}.
+If optional RAW is non-nil, return a list of section objects,
+beginning with SECTION, otherwise return a list of section types.
@end defun
@defun magit-section-content-p section
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 25e71c1b4a..656a91cd87 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -596,9 +596,8 @@ instead of in the one whose root `magit-root-section' is."
(defun magit-section-lineage (section &optional raw)
"Return the lineage of SECTION.
-If optional RAW is non-nil, return a list of section object
-beginning with SECTION, otherwise return a list of section
-types."
+If optional RAW is non-nil, return a list of section objects, beginning
+with SECTION, otherwise return a list of section types."
(cons (if raw section (oref section type))
(and-let* ((parent (oref section parent)))
(magit-section-lineage parent raw))))