Mercurial > emacs
comparison lisp/progmodes/ebrowse.el @ 28548:19c5020c0db3
(ebrowse-tree-mode): Use
propertized-buffer-identification.
(ebrowse-update-member-buffer-mode-line): Likewise.
(ebrowse--mode-strings): Removed.
(ebrowse--mode-line-props): Removed.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 10 Apr 2000 19:53:29 +0000 |
parents | f0c234df148e |
children | 7c903a96e495 |
comparison
equal
deleted
inserted
replaced
28547:64b8401fb9a5 | 28548:19c5020c0db3 |
---|---|
640 (defvar ebrowse--decl-column nil | 640 (defvar ebrowse--decl-column nil |
641 "Column in which declarations are displayed in member buffers. | 641 "Column in which declarations are displayed in member buffers. |
642 Buffer-local in Ebrowse member buffers.") | 642 Buffer-local in Ebrowse member buffers.") |
643 | 643 |
644 | 644 |
645 (defvar ebrowse--mode-strings nil | |
646 "Strings displayed in the mode line. | |
647 Buffer-local in Ebrowse tree buffers.") | |
648 | |
649 | |
650 (defvar ebrowse--frame-configuration nil | 645 (defvar ebrowse--frame-configuration nil |
651 "Frame configuration saved when viewing a class/member in another frame. | 646 "Frame configuration saved when viewing a class/member in another frame. |
652 Buffer-local in Ebrowse buffers.") | 647 Buffer-local in Ebrowse buffers.") |
653 | 648 |
654 | 649 |
659 | 654 |
660 | 655 |
661 (defvar ebrowse--tree nil | 656 (defvar ebrowse--tree nil |
662 "Class tree. | 657 "Class tree. |
663 Buffer-local in Ebrowse buffers.") | 658 Buffer-local in Ebrowse buffers.") |
664 | |
665 | |
666 (defvar ebrowse--mode-line-props nil | |
667 "Text properties of mode line strings in member buffers. | |
668 Buffer-local in Ebrowse member buffers.") | |
669 | 659 |
670 | 660 |
671 ;;; Temporaries used to communicate with `ebrowse-find-pattern'. | 661 ;;; Temporaries used to communicate with `ebrowse-find-pattern'. |
672 | 662 |
673 (defvar ebrowse-temp-position-to-view nil) | 663 (defvar ebrowse-temp-position-to-view nil) |
1126 E.g.\\[save-buffer] writes the tree to the file it was loaded from. | 1116 E.g.\\[save-buffer] writes the tree to the file it was loaded from. |
1127 | 1117 |
1128 Tree mode key bindings: | 1118 Tree mode key bindings: |
1129 \\{ebrowse-tree-mode-map}" | 1119 \\{ebrowse-tree-mode-map}" |
1130 (interactive) | 1120 (interactive) |
1131 (let* ((props (text-properties-at | 1121 (let* ((ident (propertized-buffer-identification "C++ Tree")) |
1132 0 | |
1133 (car (default-value 'mode-line-buffer-identification)))) | |
1134 (ident (apply #'propertize "C++ Tree" props)) | |
1135 header tree buffer-read-only) | 1122 header tree buffer-read-only) |
1136 | 1123 |
1137 (kill-all-local-variables) | 1124 (kill-all-local-variables) |
1138 (use-local-map ebrowse-tree-mode-map) | 1125 (use-local-map ebrowse-tree-mode-map) |
1139 | 1126 |
1151 ebrowse--tree | 1138 ebrowse--tree |
1152 ebrowse--header | 1139 ebrowse--header |
1153 ebrowse--show-file-names-flag | 1140 ebrowse--show-file-names-flag |
1154 ebrowse--frozen-flag | 1141 ebrowse--frozen-flag |
1155 ebrowse--tree-obarray | 1142 ebrowse--tree-obarray |
1156 ebrowse--mode-strings | |
1157 revert-buffer-function)) | 1143 revert-buffer-function)) |
1158 | 1144 |
1159 (setf ebrowse--show-file-names-flag nil | 1145 (setf ebrowse--show-file-names-flag nil |
1160 ebrowse--tree-obarray (make-vector 127 0) | 1146 ebrowse--tree-obarray (make-vector 127 0) |
1161 ebrowse--frozen-flag nil | 1147 ebrowse--frozen-flag nil |
1162 major-mode 'ebrowse-tree-mode | 1148 major-mode 'ebrowse-tree-mode |
1163 mode-name "Ebrowse-Tree" | 1149 mode-name "Ebrowse-Tree" |
1164 mode-line-buffer-identification (list ident) | 1150 mode-line-buffer-identification ident |
1165 buffer-read-only t | 1151 buffer-read-only t |
1166 selective-display t | 1152 selective-display t |
1167 selective-display-ellipses t | 1153 selective-display-ellipses t |
1168 revert-buffer-function 'ebrowse-revert-tree-buffer-from-file | 1154 revert-buffer-function 'ebrowse-revert-tree-buffer-from-file |
1169 ebrowse--header header | 1155 ebrowse--header header |
1181 | 1167 |
1182 | 1168 |
1183 | 1169 |
1184 (defun ebrowse-update-tree-buffer-mode-line () | 1170 (defun ebrowse-update-tree-buffer-mode-line () |
1185 "Update the tree buffer mode line." | 1171 "Update the tree buffer mode line." |
1186 (setf ebrowse--mode-strings | |
1187 (concat (if ebrowse--frozen-flag (or buffer-file-name | |
1188 ebrowse--tags-file-name)) | |
1189 (if (buffer-modified-p) "-**"))) | |
1190 (ebrowse-rename-buffer (if ebrowse--frozen-flag | 1172 (ebrowse-rename-buffer (if ebrowse--frozen-flag |
1191 (ebrowse-frozen-tree-buffer-name | 1173 (ebrowse-frozen-tree-buffer-name |
1192 ebrowse--tags-file-name) | 1174 ebrowse--tags-file-name) |
1193 ebrowse-tree-buffer-name)) | 1175 ebrowse-tree-buffer-name)) |
1194 (force-mode-line-update)) | 1176 (force-mode-line-update)) |
2277 ebrowse--tree-obarray | 2259 ebrowse--tree-obarray |
2278 ebrowse--virtual-display-flag | 2260 ebrowse--virtual-display-flag |
2279 ebrowse--inline-display-flag | 2261 ebrowse--inline-display-flag |
2280 ebrowse--const-display-flag | 2262 ebrowse--const-display-flag |
2281 ebrowse--pure-display-flag | 2263 ebrowse--pure-display-flag |
2282 ebrowse--mode-line-props | |
2283 ebrowse--frozen-flag)) ;buffer not automagically reused | 2264 ebrowse--frozen-flag)) ;buffer not automagically reused |
2284 (setq ebrowse--mode-line-props (text-properties-at | 2265 (setq mode-name "Ebrowse-Members" |
2285 0 (car (default-value | 2266 mode-line-buffer-identification |
2286 'mode-line-buffer-identification))) | 2267 (propertized-buffer-identification "C++ Members") |
2287 mode-name "Ebrowse-Members" | |
2288 mode-line-buffer-identification 'ebrowse--member-mode-strings | |
2289 buffer-read-only t | 2268 buffer-read-only t |
2290 ebrowse--long-display-flag nil | 2269 ebrowse--long-display-flag nil |
2291 ebrowse--attributes-flag t | 2270 ebrowse--attributes-flag t |
2292 ebrowse--show-inherited-flag t | 2271 ebrowse--show-inherited-flag t |
2293 ebrowse--source-regexp-flag nil | 2272 ebrowse--source-regexp-flag nil |
2321 "Update the mode line of member buffers." | 2300 "Update the mode line of member buffers." |
2322 (let* ((name (when ebrowse--frozen-flag | 2301 (let* ((name (when ebrowse--frozen-flag |
2323 (concat (ebrowse-class-name-displayed-in-member-buffer) | 2302 (concat (ebrowse-class-name-displayed-in-member-buffer) |
2324 " "))) | 2303 " "))) |
2325 (ident (concat name (ebrowse-member-list-name)))) | 2304 (ident (concat name (ebrowse-member-list-name)))) |
2326 (setq ebrowse--member-mode-strings | 2305 (setq mode-line-buffer-identification |
2327 (apply #'propertize ident ebrowse--mode-line-props)) | 2306 (propertized-buffer-identification ident)) |
2328 (ebrowse-rename-buffer (if name ident ebrowse-member-buffer-name)) | 2307 (ebrowse-rename-buffer (if name ident ebrowse-member-buffer-name)) |
2329 (force-mode-line-update))) | 2308 (force-mode-line-update))) |
2330 | 2309 |
2331 | 2310 |
2332 ;;; Misc member buffer commands | 2311 ;;; Misc member buffer commands |