Function: speedbar-expand-line-descendants

speedbar-expand-line-descendants is an interactive and byte-compiled function defined in speedbar.el.gz.

Signature

(speedbar-expand-line-descendants &optional ARG)

Documentation

Expand the line under the cursor and all descendants.

Optional argument ARG indicates that any cache should be flushed.

Probably introduced at or before Emacs version 22.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-expand-line-descendants (&optional arg)
  "Expand the line under the cursor and all descendants.
Optional argument ARG indicates that any cache should be flushed."
  (interactive "P")
  (dframe-message "Expanding all descendants...")
  (save-excursion
    (let ((top-depth (speedbar--get-line-indent-level)))
      ;; Attempt to expand the top-level item.
      (speedbar-expand-line arg)
      ;; Move forwards, either into the newly expanded list, onto an
      ;; already expanded list, onto a sibling item, or to the end of
      ;; the buffer.
      (while (and (zerop (forward-line 1))
                  (not (eobp))
                  (> (speedbar--get-line-indent-level) top-depth)
                  (speedbar-expand-line arg)))))
  (dframe-message "Expanding all descendants...done")
  (speedbar-position-cursor-on-line))