Mercurial > emacs
annotate lisp/cedet/semantic/decorate/include.el @ 104451:2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
lisp/cedet/semantic/decorate/mode.el: New files.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 05 Sep 2009 20:45:54 +0000 |
parents | |
children | 6065d66f0c99 |
rev | line source |
---|---|
104451
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
1 ;;; semantic/decorate/include.el --- Decoration modes for include statements |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
3 ;; Copyright (C) 2008, 2009 Free Software Foundation, Inc. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
4 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 ;; Author: Eric M. Ludlam <zappo@gnu.org> |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 ;; This file is part of GNU Emacs. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 ;; GNU Emacs is free software: you can redistribute it and/or modify |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 ;; it under the terms of the GNU General Public License as published by |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
11 ;; the Free Software Foundation, either version 3 of the License, or |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 ;; (at your option) any later version. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
13 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
14 ;; GNU Emacs is distributed in the hope that it will be useful, |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 ;; GNU General Public License for more details. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 ;; You should have received a copy of the GNU General Public License |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
22 ;;; Commentary: |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 ;; Highlight any include that is in a state the user may care about. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 ;; The basic idea is to have the state be highly visible so users will |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 ;; as 'what is this?" and get the info they need to fix problems that |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 ;; are otherwises transparent when trying to get smart completion |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
28 ;; working. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
30 (require 'semantic/decorate/mode) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
31 (require 'semantic/db) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 (require 'semantic/db-ref) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 (require 'semantic/db-find) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
34 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 (eval-when-compile |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
36 (require 'semantic/find)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
37 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
38 (defvar semantic-dependency-system-include-path) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
39 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
40 ;;; Code: |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
41 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
42 ;;; FACES AND KEYMAPS |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
43 (defvar semantic-decoratiton-mouse-3 (if (featurep 'xemacs) [ button3 ] [ mouse-3 ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
44 "The keybinding lisp object to use for binding the right mouse button.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
45 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
46 ;;; Includes that that are in a happy state! |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
47 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
48 (defface semantic-decoration-on-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
49 nil |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
50 "*Overlay Face used on includes that are not in some other state. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
51 Used by the decoration style: `semantic-decoration-on-includes'." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
52 :group 'semantic-faces) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
53 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
54 (defvar semantic-decoration-on-include-map |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
55 (let ((km (make-sparse-keymap))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
56 (define-key km semantic-decoratiton-mouse-3 'semantic-decoration-include-menu) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
57 km) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
58 "Keymap used on includes.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
59 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
60 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
61 (defvar semantic-decoration-on-include-menu nil |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
62 "Menu used for include headers.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
63 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
64 (easy-menu-define |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
65 semantic-decoration-on-include-menu |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
66 semantic-decoration-on-include-map |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
67 "Include Menu" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
68 (list |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
69 "Include" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
70 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
71 ["What Is This?" semantic-decoration-include-describe |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
72 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
73 :help "Describe why this include has been marked this way." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
74 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
75 ["Visit This Include" semantic-decoration-include-visit |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
76 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
77 :help "Visit this include file." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
78 "---" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
79 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
80 ["Summarize includes current buffer" semantic-decoration-all-include-summary |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
81 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
82 :help "Show a summary for the current buffer containing this include." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
83 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
84 ["List found includes (load unparsed)" semanticdb-find-test-translate-path |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
85 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
86 :help "List all includes found for this file, and parse unparsed files." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
87 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
88 ["List found includes (no loading)" semanticdb-find-test-translate-path-no-loading |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
89 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
90 :help "List all includes found for this file, do not parse unparsed files." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
91 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
92 ["List all unknown includes" semanticdb-find-adebug-lost-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
93 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
94 :help "Show a list of all includes semantic cannot find for this file." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
95 "---" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
96 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
97 ["Customize System Include Path" semantic-customize-system-include-path |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
98 :active (get 'semantic-dependency-system-include-path major-mode) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
99 :help "Run customize for the system include path for this major mode." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
100 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
101 ["Add a System Include Path" semantic-add-system-include |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
102 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
103 :help "Add an include path for this session." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
104 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
105 ["Remove a System Include Path" semantic-remove-system-include |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
106 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
107 :help "Add an include path for this session." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
108 ;;["" semantic-decoration-include- |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
109 ;; :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
110 ;; :help "" ] |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
111 )) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
112 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
113 ;;; Unknown Includes! |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
114 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
115 (defface semantic-decoration-on-unknown-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
116 '((((class color) (background dark)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
117 (:background "#900000")) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
118 (((class color) (background light)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
119 (:background "#ff5050"))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
120 "*Face used to show includes that cannot be found. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
121 Used by the decoration style: `semantic-decoration-on-unknown-includes'." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
122 :group 'semantic-faces) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
123 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
124 (defvar semantic-decoration-on-unknown-include-map |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
125 (let ((km (make-sparse-keymap))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
126 ;(define-key km [ mouse-2 ] 'semantic-decoration-unknown-include-describe) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
127 (define-key km semantic-decoratiton-mouse-3 'semantic-decoration-unknown-include-menu) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
128 km) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
129 "Keymap used on unparsed includes.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
130 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
131 (defvar semantic-decoration-on-unknown-include-menu nil |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
132 "Menu used for unparsed include headers.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
133 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
134 (easy-menu-define |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
135 semantic-decoration-on-unknown-include-menu |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
136 semantic-decoration-on-unknown-include-map |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
137 "Unknown Include Menu" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
138 (list |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
139 "Unknown Include" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
140 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
141 ["What Is This?" semantic-decoration-unknown-include-describe |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
142 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
143 :help "Describe why this include has been marked this way." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
144 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
145 ["List all unknown includes" semanticdb-find-adebug-lost-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
146 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
147 :help "Show a list of all includes semantic cannot find for this file." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
148 "---" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
149 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
150 ["Summarize includes current buffer" semantic-decoration-all-include-summary |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
151 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
152 :help "Show a summary for the current buffer containing this include." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
153 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
154 ["List found includes (load unparsed)" semanticdb-find-test-translate-path |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
155 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
156 :help "List all includes found for this file, and parse unparsed files." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
157 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
158 ["List found includes (no loading)" semanticdb-find-test-translate-path-no-loading |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
159 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
160 :help "List all includes found for this file, do not parse unparsed files." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
161 "---" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
162 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
163 ["Customize System Include Path" semantic-customize-system-include-path |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
164 :active (get 'semantic-dependency-system-include-path major-mode) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
165 :help "Run customize for the system include path for this major mode." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
166 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
167 ["Add a System Include Path" semantic-add-system-include |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
168 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
169 :help "Add an include path for this session." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
170 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
171 ["Remove a System Include Path" semantic-remove-system-include |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
172 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
173 :help "Add an include path for this session." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
174 )) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
175 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
176 ;;; Includes that need to be parsed. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
177 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
178 (defface semantic-decoration-on-unparsed-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
179 '((((class color) (background dark)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
180 (:background "#555500")) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
181 (((class color) (background light)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
182 (:background "#ffff55"))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
183 "*Face used to show includes that have not yet been parsed. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
184 Used by the decoration style: `semantic-decoration-on-unparsed-includes'." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
185 :group 'semantic-faces) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
186 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
187 (defvar semantic-decoration-on-unparsed-include-map |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
188 (let ((km (make-sparse-keymap))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
189 (define-key km semantic-decoratiton-mouse-3 'semantic-decoration-unparsed-include-menu) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
190 km) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
191 "Keymap used on unparsed includes.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
192 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
193 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
194 (defvar semantic-decoration-on-unparsed-include-menu nil |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
195 "Menu used for unparsed include headers.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
196 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
197 (easy-menu-define |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
198 semantic-decoration-on-unparsed-include-menu |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
199 semantic-decoration-on-unparsed-include-map |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
200 "Unparsed Include Menu" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
201 (list |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
202 "Unparsed Include" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
203 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
204 ["What Is This?" semantic-decoration-unparsed-include-describe |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
205 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
206 :help "Describe why this include has been marked this way." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
207 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
208 ["Visit This Include" semantic-decoration-include-visit |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
209 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
210 :help "Visit this include file so that header file's tags can be used." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
211 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
212 ["Parse This Include" semantic-decoration-unparsed-include-parse-include |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
213 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
214 :help "Parse this include file so that header file's tags can be used." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
215 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
216 ["Parse All Includes" semantic-decoration-unparsed-include-parse-all-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
217 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
218 :help "Parse all the includes so the contents can be used." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
219 "---" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
220 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
221 ["Summarize includes current buffer" semantic-decoration-all-include-summary |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
222 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
223 :help "Show a summary for the current buffer containing this include." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
224 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
225 ["List found includes (load unparsed)" semanticdb-find-test-translate-path |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
226 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
227 :help "List all includes found for this file, and parse unparsed files." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
228 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
229 ["List found includes (no loading)" semanticdb-find-test-translate-path-no-loading |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
230 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
231 :help "List all includes found for this file, do not parse unparsed files." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
232 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
233 ["List all unknown includes" semanticdb-find-adebug-lost-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
234 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
235 :help "Show a list of all includes semantic cannot find for this file." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
236 "---" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
237 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
238 ["Customize System Include Path" semantic-customize-system-include-path |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
239 :active (get 'semantic-dependency-system-include-path major-mode) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
240 :help "Run customize for the system include path for this major mode." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
241 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
242 ["Add a System Include Path" semantic-add-system-include |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
243 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
244 :help "Add an include path for this session." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
245 (semantic-menu-item |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
246 ["Remove a System Include Path" semantic-remove-system-include |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
247 :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
248 :help "Add an include path for this session." ]) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
249 ;;["" semantic-decoration-unparsed-include- |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
250 ;; :active t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
251 ;; :help "" ] |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
252 )) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
253 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
254 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
255 ;;; MODES |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
256 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
257 ;;; Include statement Decorate Mode |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
258 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
259 ;; This mode handles the three states of an include statements |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
260 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
261 (define-semantic-decoration-style semantic-decoration-on-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
262 "Highlight class members that are includes. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
263 This mode provides a nice context menu on the include statements." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
264 :enabled t) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
265 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
266 (defun semantic-decoration-on-includes-p-default (tag) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
267 "Return non-nil if TAG has is an includes that can't be found." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
268 (semantic-tag-of-class-p tag 'include)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
269 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
270 (defun semantic-decoration-on-includes-highlight-default (tag) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
271 "Highlight the include TAG to show that semantic can't find it." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
272 (let* ((file (semantic-dependency-tag-file tag)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
273 (table (when file |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
274 (semanticdb-file-table-object file t))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
275 (face nil) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
276 (map nil) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
277 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
278 (cond |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
279 ((not file) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
280 ;; Cannot find this header. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
281 (setq face 'semantic-decoration-on-unknown-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
282 map semantic-decoration-on-unknown-include-map) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
283 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
284 ((and table (number-or-marker-p (oref table pointmax))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
285 ;; A found and parsed file. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
286 (setq face 'semantic-decoration-on-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
287 map semantic-decoration-on-include-map) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
288 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
289 (t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
290 ;; An unparsed file. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
291 (setq face 'semantic-decoration-on-unparsed-includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
292 map semantic-decoration-on-unparsed-include-map) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
293 (when table |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
294 ;; Set ourselves up for synchronization |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
295 (semanticdb-cache-get |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
296 table 'semantic-decoration-unparsed-include-cache) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
297 ;; Add a dependancy. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
298 (let ((table semanticdb-current-table)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
299 (semanticdb-add-reference table tag)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
300 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
301 )) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
302 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
303 (let ((ol (semantic-decorate-tag tag |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
304 (semantic-tag-start tag) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
305 (semantic-tag-end tag) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
306 face)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
307 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
308 (semantic-overlay-put ol 'mouse-face 'highlight) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
309 (semantic-overlay-put ol 'keymap map) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
310 (semantic-overlay-put ol 'help-echo |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
311 "Header File : mouse-3 - Context menu") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
312 ))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
313 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
314 ;;; Regular Include Functions |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
315 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
316 (defun semantic-decoration-include-describe () |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
317 "Describe what unparsed includes are in the current buffer. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
318 Argument EVENT is the mouse clicked event." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
319 (interactive) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
320 (let* ((tag (or (semantic-current-tag) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
321 (error "No tag under point"))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
322 (file (semantic-dependency-tag-file tag)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
323 (table (when file |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
324 (semanticdb-file-table-object file t)))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
325 (with-output-to-temp-buffer (help-buffer) ; "*Help*" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
326 (help-setup-xref (list #'semantic-decoration-include-describe) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
327 (interactive-p)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
328 (princ "Include File: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
329 (princ (semantic-format-tag-name tag nil t)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
330 (princ "\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
331 (princ "This include file was found at:\n ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
332 (princ (semantic-dependency-tag-file tag)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
333 (princ "\n\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
334 (princ "Semantic knows where this include file is, and has parsed |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
335 its contents. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
336 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
337 ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
338 (let ((inc (semantic-find-tags-by-class 'include table)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
339 (ok 0) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
340 (unknown 0) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
341 (unparsed 0) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
342 (all 0)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
343 (dolist (i inc) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
344 (let* ((fileinner (semantic-dependency-tag-file i)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
345 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
346 (cond ((not fileinner) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
347 (setq unknown (1+ unknown))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
348 ((number-or-marker-p (oref table pointmax)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
349 (setq ok (1+ ok))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
350 (t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
351 (setq unparsed (1+ unparsed)))))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
352 (setq all (+ ok unknown unparsed)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
353 (if (= 0 all) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
354 (princ "There are no other includes in this file.\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
355 (princ (format "There are %d more includes in this file.\n" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
356 all)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
357 (princ (format " Unknown Includes: %d\n" unknown)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
358 (princ (format " Unparsed Includes: %d\n" unparsed)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
359 (princ (format " Parsed Includes: %d\n" ok))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
360 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
361 ;; Get the semanticdb statement, and display it's contents. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
362 (princ "\nDetails for header file...\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
363 (princ "\nMajor Mode: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
364 (princ (oref table :major-mode)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
365 (princ "\nTags: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
366 (princ (format "%s entries" (length (oref table :tags)))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
367 (princ "\nFile Size: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
368 (princ (format "%s chars" (oref table :pointmax))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
369 (princ "\nSave State: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
370 (cond ((oref table dirty) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
371 (princ "Table needs to be saved.")) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
372 (t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
373 (princ "Table is saved on disk.")) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
374 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
375 (princ "\nExternal References:") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
376 (dolist (r (oref table db-refs)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
377 (princ "\n ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
378 (princ (oref r file))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
379 ))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
380 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
381 ;;;;###autoload |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
382 (defun semantic-decoration-include-visit () |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
383 "Visit the included file at point." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
384 (interactive) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
385 (let ((tag (semantic-current-tag))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
386 (unless (eq (semantic-tag-class tag) 'include) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
387 (error "Point is not on an include tag")) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
388 (let ((file (semantic-dependency-tag-file tag))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
389 (cond |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
390 ((or (not file) (not (file-exists-p file))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
391 (error "Could not location include %s" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
392 (semantic-tag-name tag))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
393 ((get-file-buffer file) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
394 (switch-to-buffer (get-file-buffer file))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
395 ((stringp file) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
396 (find-file file)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
397 )))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
398 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
399 (defun semantic-decoration-include-menu (event) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
400 "Popup a menu that can help a user understand unparsed includes. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
401 Argument EVENT describes the event that caused this function to be called." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
402 (interactive "e") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
403 (let* ((startwin (selected-window)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
404 (win (semantic-event-window event)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
405 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
406 (select-window win t) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
407 (save-excursion |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
408 ;(goto-char (window-start win)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
409 (mouse-set-point event) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
410 (sit-for 0) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
411 (semantic-popup-menu semantic-decoration-on-include-menu) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
412 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
413 (select-window startwin))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
414 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
415 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
416 ;;; Unknown Include functions |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
417 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
418 (defun semantic-decoration-unknown-include-describe () |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
419 "Describe what unknown includes are in the current buffer. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
420 Argument EVENT is the mouse clicked event." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
421 (interactive) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
422 (let ((tag (semantic-current-tag)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
423 (mm major-mode)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
424 (with-output-to-temp-buffer (help-buffer) ; "*Help*" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
425 (help-setup-xref (list #'semantic-decoration-unknown-include-describe) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
426 (interactive-p)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
427 (princ "Include File: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
428 (princ (semantic-format-tag-name tag nil t)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
429 (princ "\n\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
430 (princ "This header file has been marked \"Unknown\". |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
431 This means that Semantic has not been able to locate this file on disk. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
432 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
433 When Semantic cannot find an include file, this means that the |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
434 idle summary mode and idle completion modes cannot use the contents of |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
435 that file to provide coding assistance. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
436 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
437 If this is a system header and you want it excluded from Semantic's |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
438 searches (which may be desirable for speed reasons) then you can |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
439 safely ignore this state. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
440 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
441 If this is a system header, and you want to include it in Semantic's |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
442 searches, then you will need to use: |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
443 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
444 M-x semantic-add-system-include RET /path/to/includes RET |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
445 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
446 or, in your .emacs file do: |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
447 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
448 (semantic-add-system-include \"/path/to/include\" '") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
449 (princ (symbol-name mm)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
450 (princ ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
451 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
452 to add the path to Semantic's search. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
453 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
454 If this is an include file that belongs to your project, then you may |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
455 need to update `semanticdb-project-roots' or better yet, use `ede' |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
456 to manage your project. See the ede manual for projects that will |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
457 wrap existing project code for Semantic's benifit. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
458 ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
459 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
460 (when (or (eq mm 'c++-mode) (eq mm 'c-mode)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
461 (princ " |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
462 For C/C++ includes located within a a project, you can use a special |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
463 EDE project that will wrap an existing build system. You can do that |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
464 like this in your .emacs file: |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
465 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
466 (ede-cpp-root-project \"NAME\" :file \"FILENAME\" :locate-fcn 'MYFCN) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
467 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
468 See the CEDET manual, the EDE manual, or the commentary in |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
469 ede-cpp-root.el for more. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
470 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
471 If you think this header tag is marked in error, you may need to do: |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
472 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
473 C-u M-x bovinate RET |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
474 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
475 to refresh the tags in this buffer, and recalculate the state.")) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
476 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
477 (princ " |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
478 See the Semantic manual node on SemanticDB for more about search paths.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
479 ))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
480 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
481 (defun semantic-decoration-unknown-include-menu (event) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
482 "Popup a menu that can help a user understand unparsed includes. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
483 Argument EVENT describes the event that caused this function to be called." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
484 (interactive "e") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
485 (let* ((startwin (selected-window)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
486 ;; This line has an issue in XEmacs. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
487 (win (semantic-event-window event)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
488 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
489 (select-window win t) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
490 (save-excursion |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
491 ;(goto-char (window-start win)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
492 (mouse-set-point event) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
493 (sit-for 0) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
494 (semantic-popup-menu semantic-decoration-on-unknown-include-menu) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
495 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
496 (select-window startwin))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
497 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
498 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
499 ;;; Interactive parts of unparsed includes |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
500 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
501 (defun semantic-decoration-unparsed-include-describe () |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
502 "Describe what unparsed includes are in the current buffer. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
503 Argument EVENT is the mouse clicked event." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
504 (interactive) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
505 (let ((tag (semantic-current-tag))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
506 (with-output-to-temp-buffer (help-buffer); "*Help*" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
507 (help-setup-xref (list #'semantic-decoration-unparsed-include-describe) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
508 (interactive-p)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
509 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
510 (princ "Include File: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
511 (princ (semantic-format-tag-name tag nil t)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
512 (princ "\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
513 (princ "This include file was found at:\n ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
514 (princ (semantic-dependency-tag-file tag)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
515 (princ "\n\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
516 (princ "This header file has been marked \"Unparsed\". |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
517 This means that Semantic has located this header file on disk |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
518 but has not yet opened and parsed this file. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
519 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
520 So long as this header file is unparsed, idle summary and |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
521 idle completion will not be able to reference the details in this |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
522 header. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
523 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
524 To resolve this, use the context menu to parse this include file, |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
525 or all include files referred to in ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
526 (princ (buffer-name)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
527 (princ ". |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
528 This can take a while in large projects. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
529 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
530 Alternately, you can call: |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
531 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
532 M-x semanticdb-find-test-translate-path RET |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
533 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
534 to search path Semantic uses to perform completion. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
535 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
536 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
537 If you think this header tag is marked in error, you may need to do: |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
538 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
539 C-u M-x bovinate RET |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
540 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
541 to refresh the tags in this buffer, and recalculate the state. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
542 If you find a repeatable case where a header is marked in error, |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
543 report it to cedet-devel@lists.sf.net.") ))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
544 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
545 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
546 (defun semantic-decoration-unparsed-include-menu (event) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
547 "Popup a menu that can help a user understand unparsed includes. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
548 Argument EVENT describes the event that caused this function to be called." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
549 (interactive "e") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
550 (let* ((startwin (selected-window)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
551 (win (semantic-event-window event)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
552 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
553 (select-window win t) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
554 (save-excursion |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
555 ;(goto-char (window-start win)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
556 (mouse-set-point event) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
557 (sit-for 0) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
558 (semantic-popup-menu semantic-decoration-on-unparsed-include-menu) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
559 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
560 (select-window startwin))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
561 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
562 (defun semantic-decoration-unparsed-include-parse-include () |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
563 "Parse the include file the user menu-selected from." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
564 (interactive) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
565 (let* ((file (semantic-dependency-tag-file (semantic-current-tag)))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
566 (semanticdb-file-table-object file) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
567 (semantic-decoration-unparsed-include-do-reset))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
568 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
569 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
570 (defun semantic-decoration-unparsed-include-parse-all-includes () |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
571 "Parse the include file the user menu-selected from." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
572 (interactive) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
573 (semanticdb-find-translate-path nil nil) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
574 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
575 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
576 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
577 ;;; General Includes Information |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
578 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
579 (defun semantic-decoration-all-include-summary () |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
580 "Provide a general summary for the state of all includes." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
581 (interactive) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
582 (require 'semantic/dep) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
583 (let* ((table semanticdb-current-table) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
584 (tags (semantic-fetch-tags)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
585 (inc (semantic-find-tags-by-class 'include table)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
586 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
587 (with-output-to-temp-buffer (help-buffer) ;"*Help*" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
588 (help-setup-xref (list #'semantic-decoration-all-include-summary) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
589 (interactive-p)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
590 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
591 (princ "Include Summary for File: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
592 (princ (file-truename (buffer-file-name))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
593 (princ "\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
594 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
595 (when (oref table db-refs) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
596 (princ "\nExternal Database References to this buffer:") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
597 (dolist (r (oref table db-refs)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
598 (princ "\n ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
599 (princ (oref r file))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
600 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
601 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
602 (princ (format "\nThis file contains %d tags, %d of which are includes.\n" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
603 (length tags) (length inc))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
604 (let ((ok 0) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
605 (unknown 0) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
606 (unparsed 0) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
607 (all 0)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
608 (dolist (i inc) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
609 (let* ((fileinner (semantic-dependency-tag-file i)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
610 (tableinner (when fileinner |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
611 (semanticdb-file-table-object fileinner t)))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
612 (cond ((not fileinner) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
613 (setq unknown (1+ unknown))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
614 ((number-or-marker-p (oref tableinner pointmax)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
615 (setq ok (1+ ok))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
616 (t |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
617 (setq unparsed (1+ unparsed)))))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
618 (setq all (+ ok unknown unparsed)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
619 (when (not (= 0 all)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
620 (princ (format " Unknown Includes: %d\n" unknown)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
621 (princ (format " Unparsed Includes: %d\n" unparsed)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
622 (princ (format " Parsed Includes: %d\n" ok))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
623 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
624 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
625 (princ "\nInclude Path Summary:\n\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
626 (when ede-object |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
627 (princ " This file's project include search is handled by the EDE object:\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
628 (princ " Buffer Target: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
629 (princ (object-print ede-object)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
630 (princ "\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
631 (when (not (eq ede-object ede-object-project)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
632 (princ " Buffer Project: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
633 (princ (object-print ede-object-project)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
634 (princ "\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
635 ) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
636 (when ede-object-project |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
637 (let ((loc (ede-get-locator-object ede-object-project))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
638 (princ " Backup in-project Locator: ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
639 (princ (object-print loc)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
640 (princ "\n"))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
641 (let ((syspath (ede-system-include-path ede-object-project))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
642 (if (not syspath) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
643 (princ " EDE Project system include path: Empty\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
644 (princ " EDE Project system include path:\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
645 (dolist (dir syspath) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
646 (princ " ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
647 (princ dir) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
648 (princ "\n")) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
649 ))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
650 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
651 (princ "\n This file's system include path is:\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
652 (dolist (dir semantic-dependency-system-include-path) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
653 (princ " ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
654 (princ dir) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
655 (princ "\n")) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
656 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
657 (let ((unk semanticdb-find-lost-includes)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
658 (when unk |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
659 (princ "\nAll unknown includes:\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
660 (dolist (tag unk) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
661 (princ " ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
662 (princ (semantic-tag-name tag)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
663 (princ "\n")) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
664 )) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
665 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
666 (let* ((semanticdb-find-default-throttle |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
667 (if (featurep 'semanticdb-find) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
668 (remq 'unloaded semanticdb-find-default-throttle) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
669 nil)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
670 (path (semanticdb-find-translate-path nil nil))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
671 (if (<= (length path) (length inc)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
672 (princ "\nThere are currently no includes found recursively.\n") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
673 ;; List the full include list. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
674 (princ "\nSummary of all includes needed by ") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
675 (princ (buffer-name)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
676 (dolist (p path) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
677 (if (slot-boundp p 'tags) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
678 (princ (format "\n %s :\t%d tags, %d are includes. %s" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
679 (object-name-string p) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
680 (length (oref p tags)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
681 (length (semantic-find-tags-by-class |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
682 'include p)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
683 (cond |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
684 ((condition-case nil |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
685 (oref p dirty) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
686 (error nil)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
687 " dirty.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
688 ((not (number-or-marker-p (oref table pointmax))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
689 " Needs to be parsed.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
690 (t "")))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
691 (princ (format "\n %s :\tUnparsed" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
692 (object-name-string p)))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
693 ))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
694 ))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
695 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
696 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
697 ;;; Unparsed Include Features |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
698 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
699 ;; This section handles changing states of unparsed include |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
700 ;; decorations base on what happens in other files. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
701 ;; |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
702 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
703 (defclass semantic-decoration-unparsed-include-cache (semanticdb-abstract-cache) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
704 () |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
705 "Class used to reset decorated includes. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
706 When an include's referring file is parsed, we need to undecorate |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
707 any decorated referring includes.") |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
708 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
709 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
710 (defmethod semantic-reset ((obj semantic-decoration-unparsed-include-cache)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
711 "Reset OBJ back to it's empty settings." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
712 (let ((table (oref obj table))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
713 ;; This is a hack. Add in something better? |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
714 (semanticdb-notify-references |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
715 table (lambda (tab me) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
716 (semantic-decoration-unparsed-include-refrence-reset tab) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
717 )) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
718 )) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
719 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
720 (defmethod semanticdb-partial-synchronize ((cache semantic-decoration-unparsed-include-cache) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
721 new-tags) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
722 "Synchronize CACHE with some NEW-TAGS." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
723 (if (semantic-find-tags-by-class 'include new-tags) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
724 (semantic-reset cache))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
725 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
726 (defmethod semanticdb-synchronize ((cache semantic-decoration-unparsed-include-cache) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
727 new-tags) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
728 "Synchronize a CACHE with some NEW-TAGS." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
729 (semantic-reset cache)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
730 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
731 (defun semantic-decoration-unparsed-include-refrence-reset (table) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
732 "Refresh any highlighting in buffers referred to by TABLE. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
733 If TABLE is not in a buffer, do nothing." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
734 ;; This cache removal may seem odd in that we are "creating one", but |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
735 ;; since we cant get in the fcn unless one exists, this ought to be |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
736 ;; ok. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
737 (let ((c (semanticdb-cache-get |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
738 table 'semantic-decoration-unparsed-include-cache))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
739 (semanticdb-cache-remove table c)) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
740 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
741 (let ((buf (semanticdb-in-buffer-p table))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
742 (when buf |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
743 (semantic-decorate-add-pending-decoration |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
744 'semantic-decoration-unparsed-include-do-reset |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
745 buf) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
746 ))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
747 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
748 ;;;;###autoload |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
749 (defun semantic-decoration-unparsed-include-do-reset () |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
750 "Do a reset of unparsed includes in the current buffer." |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
751 (let* ((style (assoc "semantic-decoration-on-includes" |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
752 semantic-decoration-styles))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
753 (when (cdr style) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
754 (let ((allinc (semantic-find-tags-included |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
755 (semantic-fetch-tags-fast)))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
756 ;; This will do everything, but it should be speedy since it |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
757 ;; would have been done once already. |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
758 (semantic-decorate-add-decorations allinc) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
759 )))) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
760 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
761 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
762 (provide 'semantic/decorate/include) |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
763 |
2858c6bcc446
lisp/cedet/semantic/decorate/include.el:
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
764 ;;; semantic/decorate/include.el ends here |