Function: ebrowse-tree-mode

ebrowse-tree-mode is an autoloaded, interactive and byte-compiled function defined in ebrowse.el.gz.

Signature

(ebrowse-tree-mode)

Documentation

Major mode for Ebrowse class tree buffers.

Each line corresponds to a class in a class tree. Letters do not insert themselves, they are commands. File operations in the tree buffer work on class tree data structures. E.g.C-x C-s (save-buffer) writes the tree to the file it was loaded from.

Tree mode key bindings:
* ebrowse-expand-all
+ ebrowse-expand-branch
- ebrowse-collapse-branch
/ ebrowse-read-class-name-and-go
<down-mouse-1> ebrowse-mouse-1-in-tree-buffer
<down-mouse-3> ebrowse-mouse-3-in-tree-buffer
<mouse-2> ebrowse-mouse-2-in-tree-buffer
? describe-mode
C-k ebrowse-remove-class-at-point
C-l ebrowse-redraw-tree
L F ebrowse-tree-command:show-static-member-functions
L SPC..~ undefined
L V ebrowse-tree-command:show-static-member-variables
L d ebrowse-tree-command:show-friends
L f ebrowse-tree-command:show-member-functions
L t ebrowse-tree-command:show-types
L v ebrowse-tree-command:show-member-variables
M SPC..~ undefined
M a ebrowse-mark-all-classes
M t ebrowse-toggle-mark-at-point
RET ebrowse-find-class-declaration
SPC ebrowse-view-class-declaration
SPC..~ undefined
T SPC..~ undefined
T f ebrowse-toggle-file-name-display
T s ebrowse-show-file-name-at-point
T w ebrowse-set-tree-indentation
TAB ebrowse-pop/switch-to-member-buffer-for-same-tree
n ebrowse-repeat-member-search
q bury-buffer
x ebrowse-statistics
y..\x3FFFFF digit-argument

In addition to any hooks its parent mode special-mode might have run, this mode runs the hook ebrowse-tree-mode-hook, as the final or penultimate step during initialization.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ebrowse.el.gz
;;; Tree-mode - mode for tree buffers

;;;###autoload
(define-derived-mode ebrowse-tree-mode special-mode "Ebrowse-Tree"
  "Major mode for Ebrowse class tree buffers.
Each line corresponds to a class in a class tree.
Letters do not insert themselves, they are commands.
File operations in the tree buffer work on class tree data structures.
E.g.\\[save-buffer] writes the tree to the file it was loaded from.

Tree mode key bindings:
\\{ebrowse-tree-mode-map}"
  (let* ((ident (propertized-buffer-identification "C++ Tree"))
	 (inhibit-read-only t)
         header tree)

    (buffer-disable-undo)

    (unless (zerop (buffer-size))
      (goto-char (point-min))
      (cl-multiple-value-setq (header tree) (cl-values-list (ebrowse-read)))
      (message "Sorting. Please be patient...")
      (setq tree (ebrowse-sort-tree-list tree))
      (erase-buffer)
      (message nil))

    (setq-local ebrowse--show-file-names-flag nil)
    (setq-local ebrowse--frozen-flag nil)
    (setq mode-line-buffer-identification ident)
    (setq buffer-read-only t)
    (add-to-invisibility-spec '(ebrowse . t))
    (setq-local revert-buffer-function #'ebrowse-revert-tree-buffer-from-file)
    (setq-local ebrowse--header header)
    (setq-local ebrowse--tree tree)
    (setq-local ebrowse--tags-file-name buffer-file-name)
    (setq-local ebrowse--tree-table (and tree (ebrowse-build-tree-table tree)))
    (setq-local ebrowse--frozen-flag nil)

    (add-hook 'write-file-functions #'ebrowse-write-file-hook-fn nil t)
    (modify-syntax-entry ?_ (char-to-string (char-syntax ?a)))
    (when tree
      (ebrowse-redraw-tree)
      (set-buffer-modified-p nil))))