commit | author | age
|
5cb5f7
|
1 |
;ELC |
C |
2 |
;;; Compiled |
|
3 |
;;; in Emacs version 26.1 |
|
4 |
;;; with all optimizations. |
|
5 |
|
|
6 |
;;; This file uses dynamic docstrings, first added in Emacs 19.29. |
|
7 |
|
|
8 |
;;; This file does not contain utf-8 non-ASCII characters, |
|
9 |
;;; and so can be loaded in Emacs versions earlier than 23. |
|
10 |
|
|
11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
12 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
13 |
|
|
14 |
|
|
15 |
(byte-code "\300\301!\210\300\302!\207" [require subr-x ztree-util] 2) |
|
16 |
#@60 If set forces ztree to draw lines with unicode characters. |
|
17 |
(defvar ztree-draw-unicode-lines nil (#$ . 479)) |
|
18 |
#@65 If set forces ztree show number of child entries in the braces. |
|
19 |
(defvar ztree-show-number-of-children nil (#$ . 593)) |
|
20 |
#@54 A list of Expanded nodes (i.e. directories) entries. |
|
21 |
(defvar ztree-expanded-nodes-list nil (#$ . 717)) |
|
22 |
(make-variable-buffer-local 'ztree-expanded-nodes-list) |
|
23 |
#@44 Start node(i.e. directory) for the window. |
|
24 |
(defvar ztree-start-node nil (#$ . 882)) |
|
25 |
(make-variable-buffer-local 'ztree-start-node) |
|
26 |
#@70 List of tuples with full node(i.e. file/directory name and the line. |
|
27 |
(defvar ztree-line-to-node-table nil (#$ . 1019)) |
|
28 |
(make-variable-buffer-local 'ztree-line-to-node-table) |
|
29 |
#@37 Index of the start line - the root. |
|
30 |
(defvar ztree-start-line nil (#$ . 1199)) |
|
31 |
(make-variable-buffer-local 'ztree-start-line) |
|
32 |
#@122 Array of parent lines. |
|
33 |
The ith value of the array is the parent line for line i. |
|
34 |
If ith value is i - it is the root line |
|
35 |
(defvar ztree-parent-lines-array nil (#$ . 1331)) |
|
36 |
(make-variable-buffer-local 'ztree-parent-lines-array) |
|
37 |
#@118 Counter for the subsequest BS keys (to identify double BS). |
|
38 |
Used in order to not to use cl package and `lexical-let' |
|
39 |
(defvar ztree-count-subsequent-bs nil (#$ . 1564)) |
|
40 |
(make-variable-buffer-local 'ztree-count-subsequent-bs) |
|
41 |
#@279 Hash table, with key - line number, value - property list of the line. |
|
42 |
The property list has the following keys: |
|
43 |
- side (`left', `right', `both'). |
|
44 |
Used for 2-side trees, to determine if the node exists on left or right |
|
45 |
or both sides |
|
46 |
- offset - the column there the text starts |
|
47 |
(defvar ztree-line-tree-properties nil (#$ . 1795)) |
|
48 |
(make-variable-buffer-local 'ztree-line-tree-properties) |
|
49 |
#@94 The cons pair of the previous line and column. Used |
|
50 |
to restore cursor position after refresh |
|
51 |
(defvar ztree-prev-position nil (#$ . 2188)) |
|
52 |
(make-variable-buffer-local 'ztree-prev-position) |
|
53 |
#@85 Function inserting the header into the tree buffer. |
|
54 |
MUST inster newline at the end! |
|
55 |
(defvar ztree-tree-header-fun nil (#$ . 2382)) |
|
56 |
(make-variable-buffer-local 'ztree-tree-header-fun) |
|
57 |
#@71 Function which creates a pretty-printable short string from the node. |
|
58 |
(defvar ztree-node-short-name-fun nil (#$ . 2571)) |
|
59 |
(make-variable-buffer-local 'ztree-node-short-name-fun) |
|
60 |
#@93 Function which determines if the node is expandable. |
|
61 |
For example if the node is a directory |
|
62 |
(defvar ztree-node-is-expandable-fun nil (#$ . 2754)) |
|
63 |
(make-variable-buffer-local 'ztree-node-is-expandable-fun) |
|
64 |
#@53 Function which determines if the 2 nodes are equal. |
|
65 |
(defvar ztree-node-equal-fun nil (#$ . 2965)) |
|
66 |
(make-variable-buffer-local 'ztree-node-equal-fun) |
|
67 |
#@43 Function returning list of node contents. |
|
68 |
(defvar ztree-node-contents-fun nil (#$ . 3120)) |
|
69 |
(make-variable-buffer-local 'ztree-node-contents-fun) |
|
70 |
#@166 Function returning position of the node: `left', `right' or `both'. |
|
71 |
If not defined (by default) - using single screen tree, otherwise |
|
72 |
the buffer is split to 2 trees |
|
73 |
(defvar ztree-node-side-fun nil (#$ . 3272)) |
|
74 |
(make-variable-buffer-local 'ztree-node-side-fun) |
|
75 |
#@39 Function returning face for the node. |
|
76 |
(defvar ztree-node-face-fun nil (#$ . 3538)) |
|
77 |
(make-variable-buffer-local 'ztree-node-face-fun) |
|
78 |
#@55 Function called when Enter/Space pressed on the node. |
|
79 |
(defvar ztree-node-action-fun nil (#$ . 3677)) |
|
80 |
(make-variable-buffer-local 'ztree-node-action-fun) |
|
81 |
#@58 Function called to decide if the node should be visible. |
|
82 |
(defvar ztree-node-showp-fun nil (#$ . 3836)) |
|
83 |
(make-variable-buffer-local 'ztree-node-showp-fun) |
|
84 |
#@26 Keymap for `ztree-mode'. |
|
85 |
(defvar ztree-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\304#\210\302\310\311#\210\302\312\313#\210\302\314\315#\210\302\316\317#\210\302\320\321#\210\203? \302\322\323#\210\202E \302\324\323#\210\211\207" [window-system make-sparse-keymap define-key "
" ztree-perform-action " " ztree-perform-soft-action [double-mouse-1] " " ztree-jump-side "g" ztree-refresh-buffer "x" ztree-toggle-expand-subtree [remap next-line] ztree-next-line [remap previous-line] ztree-previous-line [backspace] ztree-move-up-in-tree ""] 5) (#$ . 3996)) |
|
86 |
(custom-declare-face 'ztreep-node-face '((((background dark)) (:foreground "#ffffff")) (((type nil)) (:inherit 'font-lock-function-name-face)) (t (:foreground "Blue"))) "*Face used for expandable entries(directories etc) in Ztree buffer." :group 'Ztree :group 'font-lock-highlighting-faces) |
|
87 |
(defvar ztreep-node-face 'ztreep-node-face) |
|
88 |
(custom-declare-face 'ztreep-leaf-face '((((background dark)) (:foreground "cyan1")) (((type nil)) (:inherit 'font-lock-variable-name-face)) (t (:foreground "darkblue"))) "*Face used for not expandable nodes(leafs, i.e. files) in Ztree buffer." :group 'Ztree :group 'font-lock-highlighting-faces) |
|
89 |
(defvar ztreep-leaf-face 'ztreep-leaf-face) |
|
90 |
(custom-declare-face 'ztreep-arrow-face '((((background dark)) (:foreground "#7f7f7f")) (t (:foreground "#8d8d8d"))) "*Face used for arrows in Ztree buffer." :group 'Ztree :group 'font-lock-highlighting-faces) |
|
91 |
(defvar ztreep-arrow-face 'ztreep-arrow-face) |
|
92 |
(custom-declare-face 'ztreep-expand-sign-face '((((background dark)) (:foreground "#7f7fff")) (t (:foreground "#8d8d8d"))) "*Face used for expand sign [+] in Ztree buffer." :group 'Ztree :group 'font-lock-highlighting-faces) |
|
93 |
(defvar ztreep-expand-sign-face 'ztreep-expand-sign-face) |
|
94 |
(custom-declare-face 'ztreep-node-count-children-face '((t (:inherit 'font-lock-comment-face :slant italic))) "*Face used for count of number of child entries in Ztree buffer." :group 'Ztree :group 'font-lock-highlighting-faces) |
|
95 |
(defvar ztreep-node-count-children-face 'ztreep-node-count-children-face) |
|
96 |
(defvar ztree-mode-hook nil) |
|
97 |
(byte-code "\300\301N\204\f \302\300\301\303#\210\304\305!\204 \302\305\306\307#\210\300\207" [ztree-mode-hook variable-documentation put "Hook run after entering Ztree mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp ztree-mode-map definition-name ztree-mode] 4) |
|
98 |
(defvar ztree-mode-map (make-sparse-keymap)) |
|
99 |
(byte-code "\301\302N\204 \303\301\302\304\305!#\210\306\307!\204 \303\307\310\311#\210\312\313 !\210\307\302N\204- \303\307\302\304\314!#\210\306\300!\204B \303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P \303\300\302\304\320!#\210\303\311\321\322#\207" [ztree-mode-abbrev-table ztree-mode-map variable-documentation put purecopy "Keymap for `ztree-mode'." boundp ztree-mode-syntax-table definition-name ztree-mode (lambda (#1=#:def-tmp-var) (defvar ztree-mode-syntax-table #1#)) make-syntax-table "Syntax table for `ztree-mode'." (lambda (#1#) (defvar ztree-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `ztree-mode'." derived-mode-parent special-mode] 5) |
|
100 |
#@253 A major mode for displaying the directory tree in text mode. |
|
101 |
|
|
102 |
In addition to any hooks its parent mode `special-mode' might have run, |
|
103 |
this mode runs the hook `ztree-mode-hook', as the final or penultimate step |
|
104 |
during initialization. |
|
105 |
|
|
106 |
\{ztree-mode-map} |
|
107 |
(defalias 'ztree-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203 \314\311\313\310\313N#\210\315!\204' \316\317 \"\210\320\f!\211\2035 \211\321 =\203; \322\f\323 \"\210\210\324
\325\"\204R
=\204R \326
\325C#\210\327!\210\330\f!\210
\331\307)\332\333!\207" [delay-mode-hooks major-mode mode-name ztree-mode-map ztree-mode-syntax-table ztree-mode-abbrev-table make-local-variable t special-mode ztree-mode "Ztree" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table nil run-mode-hooks ztree-mode-hook local-abbrev-table indent-tabs-mode buffer-read-only] 5 (#$ . 7240) nil]) |
|
108 |
#@83 Set the cursor to specified LINE and to the text offset (if possible). |
|
109 |
|
|
110 |
(fn LINE) |
|
111 |
(defalias 'ztree-scroll-to-line #[257 "\304 \305\245\306 \307\211\310Z\311\"\210\312\313\306 \n\"\314\"\211\2054 \203- iY\203- \211T\\\262\315 \210`\\b\262*\207" [goal-column line-move-visual ztree-line-tree-properties ztree-node-side-fun window-width 2 line-number-at-pos nil line-move t plist-get gethash offset beginning-of-line] 7 (#$ . 8260)]) |
|
112 |
#@97 Return the node for the LINE specified. |
|
113 |
Search through the array of node-line pairs. |
|
114 |
|
|
115 |
(fn LINE) |
|
116 |
(defalias 'ztree-find-node-in-line #[257 "\301\"\207" [ztree-line-to-node-table gethash] 4 (#$ . 8707)]) |
|
117 |
#@105 Find the node at point. |
|
118 |
Returns cons pair (node, side) for the current point |
|
119 |
or nil if there is no node |
|
120 |
(defalias 'ztree-find-node-at-point #[0 "\300 \301\245\302\303 !\211\205 \211iV\203 \304\202 \305B\207" [window-width 2 ztree-find-node-in-line line-number-at-pos right left] 5 (#$ . 8917)]) |
|
121 |
#@63 Find if the NODE is in the list of expanded nodes. |
|
122 |
|
|
123 |
(fn NODE) |
|
124 |
(defalias 'ztree-is-expanded-node #[257 "\301\302\303\304\305\306!\307\"\310\311%\"\207" [ztree-expanded-nodes-list ztree-find make-byte-code 257 " \300\"\207" vconcat vector [ztree-node-equal-fun] 4 "\n\n(fn X)"] 9 (#$ . 9222)]) |
|
125 |
#@70 For given LINE set the PARENT in the global array. |
|
126 |
|
|
127 |
(fn LINE PARENT) |
|
128 |
(defalias 'ztree-set-parent-for-line #[514 " ZI\207" [ztree-parent-lines-array ztree-start-line] 5 (#$ . 9524)]) |
|
129 |
#@44 For given LINE return a parent. |
|
130 |
|
|
131 |
(fn LINE) |
|
132 |
(defalias 'ztree-get-parent-for-line #[257 "\211Y\205 \211 G\\W\205 ZH\207" [ztree-start-line ztree-parent-lines-array] 4 (#$ . 9715)]) |
|
133 |
#@105 Iteration in expanding subtree. |
|
134 |
Argument NODE current node. |
|
135 |
Argument STATE node state. |
|
136 |
|
|
137 |
(fn NODE STATE) |
|
138 |
(defalias 'ztree-do-toggle-expand-subtree-iter #[514 "!\205% !\302\"\210\211\211\205! \211@\303\"\210A\266\202\202 \262\262\207" [ztree-node-is-expandable-fun ztree-node-contents-fun ztree-do-toggle-expand-state ztree-do-toggle-expand-subtree-iter] 8 (#$ . 9908)]) |
|
139 |
#@32 Implements the subtree expand. |
|
140 |
(defalias 'ztree-do-toggle-expand-subtree #[0 "\301 \302!\303 !\205 |