Mercurial > emacs
annotate doc/misc/sem-user.texi @ 106328:5475f1c5e4ed
(multi-isearch-read-buffers)
(multi-isearch-read-matching-buffers): New functions.
(multi-isearch-buffers, multi-isearch-buffers-regexp):
Use them in the `interactive' spec. Doc fix.
(multi-isearch-read-files, multi-isearch-read-matching-files):
New functions.
(multi-isearch-files, multi-isearch-files-regexp):
Use them in the `interactive' spec. Doc fix. (Bug#4725)
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Mon, 30 Nov 2009 19:42:16 +0000 |
parents | 6e2494c3a2ff |
children | 3b90f039f42b |
rev | line source |
---|---|
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
1 @c This file is included by semantic.texi |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
106084 | 3 @c Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009 |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
4 @c Free Software Foundation, Inc. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 @c Permission is granted to copy, distribute and/or modify this |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 @c document under the terms of the GNU Free Documentation License, |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 @c Version 1.3 or any later version published by the Free Software |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 @c Foundation; with no Invariant Sections, no Front-Cover Texts, and |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 @c no Back-Cover Texts. A copy of the license is included in the |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
11 @c section entitled ``GNU Free Documentation License''. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
13 You can begin using @semantic{} by enabling Semantic mode, a global |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
14 minor mode: type @kbd{M-x semantic-mode}, or click on the @samp{Source |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 Code Parsers (Semantic)} menu item in the @samp{Tools} menu. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 When Semantic mode is turned on, Emacs automatically parses each file |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 you visit. This allows you to use @semantic{} user commands in those |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 buffers. It also enables a number of ``helper'' minor modes for |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 saving tags, displaying tag information, and so forth. @xref{Semantic |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 mode}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
22 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 To enable Semantic mode each time you start Emacs, add the line |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 @code{(semantic-mode 1)} to your initialization file. @xref{Init |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 File,,,emacs,Emacs manual}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 @menu |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
28 * Semantic mode:: Global minor mode for @semantic{}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 * SemanticDB:: Caching parsed buffers between sessions. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
30 * Idle Scheduler:: Performing @semantic{} operations when idle. |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
31 * Analyzer:: Semantic tools for analyzing code. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 @end menu |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
34 @node Semantic mode |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 @section Semantic mode |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
36 @cindex Semantic mode |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
37 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
38 Semantic mode is a global minor mode for @semantic{} as a whole. When |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
39 enabled, each file you visit is automatically parsed, provided its |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
40 major mode is specified in the variable |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
41 @code{semantic-new-buffer-setup-functions} (the default is to parse |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
42 every buffer @semantic{} knows how to parse). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
43 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
44 In each parser-enabled buffer, a number of @semantic{} commands are |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
45 available for navigating, querying, and editing source code. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
46 @xref{Semantic mode user commands}. Enabling Semantic mode also |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
47 installs a @samp{Development} menu on the menu-bar, with many of these |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
48 commands. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
49 |
106076
e142b685cd90
* semantic.texi (Semantic Internals, Glossary):
Juanma Barranquero <lekktu@gmail.com>
parents:
106061
diff
changeset
|
50 In addition, enabling Semantic mode turns on certain auxiliary global |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
51 minor modes, as specified by the variable |
106076
e142b685cd90
* semantic.texi (Semantic Internals, Glossary):
Juanma Barranquero <lekktu@gmail.com>
parents:
106061
diff
changeset
|
52 @code{semantic-default-submodes}. The default auxiliary modes are |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
53 SemanticDB mode (@pxref{SemanticDB}) and Global Semantic Idle |
106306
6e2494c3a2ff
* sem-user.texi (Semantic mode): Link to Idle Scheduler.
Chong Yidong <cyd@stupidchicken.com>
parents:
106305
diff
changeset
|
54 Scheduler mode (@pxref{Idle Scheduler}). You can also toggle the |
6e2494c3a2ff
* sem-user.texi (Semantic mode): Link to Idle Scheduler.
Chong Yidong <cyd@stupidchicken.com>
parents:
106305
diff
changeset
|
55 auxiliary minor modes separately, using their mode functions |
6e2494c3a2ff
* sem-user.texi (Semantic mode): Link to Idle Scheduler.
Chong Yidong <cyd@stupidchicken.com>
parents:
106305
diff
changeset
|
56 (e.g. @kbd{M-x semanticdb-minor-mode}), or via the @samp{Development} |
6e2494c3a2ff
* sem-user.texi (Semantic mode): Link to Idle Scheduler.
Chong Yidong <cyd@stupidchicken.com>
parents:
106305
diff
changeset
|
57 menu. These auxiliary minor modes are described in the following |
6e2494c3a2ff
* sem-user.texi (Semantic mode): Link to Idle Scheduler.
Chong Yidong <cyd@stupidchicken.com>
parents:
106305
diff
changeset
|
58 sections. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
59 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
60 @defvar semantic-new-buffer-setup-functions |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
61 The value of this variable is an alist of functions to call for |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
62 setting up @semantic{} parsing in the buffer. Each element has the |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
63 form @code{(@var{mode} . @var{fn})}, where @var{mode} is a value of |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
64 @code{major-mode} for the buffer and @var{fn} is the corresponding |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
65 function for setting up the parser. @var{fn} is called, with no |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
66 arguments, after the major mode is initialized (and after the mode |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
67 hooks have been run). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
68 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
69 The default value enables @semantic{} for all supported major modes |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
70 (i.e., C, C++, Scheme, Javascript, Java, HTML, SRecode, and Make), but |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
71 you can remove modes from this list if you don't want to use |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
72 @semantic{} with them. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
73 @end defvar |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
74 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
75 @defvar semantic-default-submodes |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
76 The value of this variable is a list of symbols, specifying the |
106076
e142b685cd90
* semantic.texi (Semantic Internals, Glossary):
Juanma Barranquero <lekktu@gmail.com>
parents:
106061
diff
changeset
|
77 auxiliary minor modes to enable when enabling Semantic mode. The |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
78 valid mode symbols are: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
79 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
80 @itemize |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
81 @item @code{semantic-idle-scheduler-mode} (@pxref{Idle Scheduler}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
82 @item @code{semanticdb-minor-mode} (@pxref{SemanticDB}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
83 @item @code{semantic-idle-summary-mode} (@pxref{Idle Summary Mode}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
84 @item @code{semantic-idle-completions-mode} (@pxref{Idle Completions Mode}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
85 @item @code{semantic-highlight-func-mode} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
86 @item @code{semantic-decoration-mode} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
87 @item @code{semantic-stickyfunc-mode} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
88 @item @code{semantic-mru-bookmark-mode} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
89 @end itemize |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
90 @end defvar |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
91 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
92 @menu |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
93 * Semantic mode user commands:: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
94 @end menu |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
95 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
96 @node Semantic mode user commands |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
97 @subsection Semantic mode user commands |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
98 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
99 Semantic mode provides a number of commands for navigating, querying, |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
100 and editing source code in a language-aware manner. These commands |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
101 generally act on @dfn{tags}, which are the source-code units deemed |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
102 ``important'' by the present programming language (e.g. functions in |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
103 the C programming language). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
104 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
105 These commands may be used in any buffer that has been parsed by |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
106 @semantic{}. Several of them prompt for a tag name using the |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
107 minibuffer; here, the @kbd{TAB} key can be used to complete tag names. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
108 Others act on the @dfn{current tag}, meaning the tag at (or around) |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
109 point. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
110 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
111 @table @kbd |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
112 @item C-c , j |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
113 Prompt for a tag defined in the current file, and move point to it |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
114 (@code{semantic-complete-jump-local}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
115 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
116 @item C-c , J |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
117 Prompt for a tag defined in any file that Emacs has parsed, and move |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
118 point to it (@code{semantic-complete-jump}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
119 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
120 @item C-c , l |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
121 Display a list of the possible completions of the current tag |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
122 (@code{semantic-analyze-possible-completions}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
123 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
124 @item C-c , g |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
125 Prompt for a tag, and display a list of tags that call it |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
126 (@code{semantic-symref-symbol}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
127 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
128 @item C-c , G |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
129 Display a list of tags that call the current tag |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
130 (@code{semantic-symref}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
131 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
132 @item C-c , p |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
133 Move point to the previous tag (@code{senator-previous-tag}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
134 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
135 @item C-c , n |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
136 Move point to the next tag (@code{senator-next-tag}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
137 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
138 @item C-c , u |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
139 Move point ``up'' one reference (@code{senator-go-to-up-reference}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
140 The meaning of ``up'' is language-dependent; in C++, for instance, |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
141 this means moving to the parent of the current tag. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
142 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
143 @item C-c, @key{SPC} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
144 Display a list of possible completions for the symbol at point |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
145 (@code{semantic-complete-analyze-inline}). This also activates a |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
146 special set of keybindings for choosing a completion: @key{RET} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
147 accepts the current completion, @kbd{M-n} and @kbd{M-p} cycle through |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
148 possible completions, @key{TAB} completes as far as possible and then |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
149 cycles, and @kbd{C-g} or any other key aborts the completion. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
150 @xref{Smart Completion}. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
151 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
152 @item C-c , C-w |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
153 Kill the current tag (@code{senator-kill-tag}). This removes the text |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
154 for that tag, placing it in the kill ring. You can retrieve the text |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
155 with @kbd{C-y}. This also places the tag in the @dfn{tag ring}, so |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
156 that you can yank it with @kbd{\C-c,\C-y}, below. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
157 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
158 @item C-c , M-w |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
159 Copy the current tag into the kill ring as well as the tag ring |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
160 (@code{senator-copy-tag}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
161 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
162 @item C-c , C-y |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
163 Yank a tag from the tag ring (@code{senator-yank-tag}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
164 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
165 @item C-c , r |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
166 Copy the current tag into a register |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
167 (@code{senator-copy-tag-to-register}). With an optional argument, |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
168 kill it as well. This allows you to insert or jump to that tag with |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
169 the usual register commands. @xref{Registers,,,emacs,Emacs manual}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
170 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
171 @item \C-c , @kbd{up} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
172 Transpose the current tag with the previous one |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
173 (@code{senator-transpose-tags-up}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
174 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
175 @item C-c , @kbd{down} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
176 Transpose the current tag with the next one |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
177 (@code{senator-transpose-tags-down}). |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
178 @end table |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
179 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
180 @node SemanticDB |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
181 @section Semantic Database |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
182 @cindex SemanticDB |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
183 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
184 The Semantic Database (SemanticDB) caches the results of parsing |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
185 source code files. This data can be saved to disk when you exit |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
186 Emacs, and reloaded automatically when you subsequently revisit the |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
187 same source code files. This saves time by eliminating the need to |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
188 re-parse unmodified files. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
189 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
190 SemanticDB also provides an @acronym{API} that programs can use to |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
191 acquire information about source code tags. This information can be |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
192 accessed without loading the original the source files into memory. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
193 It can also be used to create alternate ``back-ends'' for storing tag |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
194 information in alternative on-disk formats. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
195 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
196 By default, SemanticDB is enabled together with Semantic mode. To |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
197 disable it, remove it from @code{semantic-default-submodes} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
198 (@pxref{Semantic mode}). You can also enable or disable SemanticDB |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
199 with @kbd{M-x global-semanticdb-minor-mode}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
200 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
201 @deffn Command global-semanticdb-minor-mode |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
202 Toggle SemanticDB mode. When enabled, any source code parsed by |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
203 @semantic{} is cached in a database. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
204 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
205 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
206 SemanticDB offers a large number of customizable options, which are |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
207 described in the following subsections. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
208 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
209 @menu |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
210 * Semanticdb Tag Storage:: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
211 * Semanticdb Search Configuration:: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
212 * Changing Backends:: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
213 * Create System Databases:: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
214 @end menu |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
215 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
216 @node Semanticdb Tag Storage |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
217 @subsection Semanticdb Tag Storage |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
218 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
219 Each time you exit Emacs, any data cached by SemanticDB is saved in |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
220 the directory @file{.emacs.d/semanticdb/}, located in your home |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
221 directory. Within this directory, the cache data is written into a |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
222 set of files according to a SemanticDB-specific filename convention. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
223 If the SemanticDB directory does not exist, Emacs first asks if you |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
224 want to create it. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
225 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
226 You can change the name of the SemanticDB directory by customizing the |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
227 variable @code{semanticdb-default-save-directory}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
228 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
229 @anchor{semanticdb-default-save-directory} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
230 @deffn Option semanticdb-default-save-directory |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
231 The name of the directory where SemanticDB cache files are saved. If |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
232 the value is @code{nil}, SemanticDB saves its data into a single file, |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
233 in the current directory, whose filename is given by |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
234 @code{semanticdb-default-file-name}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
235 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
236 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
237 @anchor{semanticdb-default-file-name} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
238 @deffn Option semanticdb-default-file-name |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
239 The name of a cache file in which to save SemanticDB, when |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
240 @code{semanticdb-default-save-directory} is @code{nil}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
241 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
242 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
243 You can force SemanticDB to save the data from only certain files, or |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
244 suppress saving altogether, by customizing |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
245 @code{semanticdb-persistent-path}: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
246 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
247 @anchor{semanticdb-persistent-path} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
248 @deffn Option semanticdb-persistent-path |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
249 List of valid paths for SemanticDB to cache. Each element should be a |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
250 directory name (a string); then the parse data from any file in that |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
251 directory is saved. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
252 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
253 As a special exception, the value of this variable can be a list |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
254 containing a single symbol: @code{never}, @code{always}, or |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
255 @code{project}. The symbol @code{never} disables saving anywhere; |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
256 @code{always} enables saving everywhere; and @code{project} enables |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
257 saving directory based on the variable |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
258 @code{semanticdb-project-predicate-functions}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
259 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
260 The default value is @code{(always)}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
261 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
262 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
263 @anchor{semanticdb-project-predicate-functions} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
264 @defvar semanticdb-project-predicate-functions |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
265 The value of this variable is a list of predicates for indicating that |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
266 a directory belongs to a project. This list is used when the value of |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
267 @code{semanticdb-persistent-path} is @code{(project)}. If the list is |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
268 empty, all paths are considered valid. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
269 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
270 Project management packages, such as EDE (@pxref{Top,,,ede,EDE |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
271 manual}), may add their own predicates with @dfn{add-hook} to this |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
272 variable. This allows SemanticDB to save tag caches in directories |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
273 controlled by them. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
274 @end defvar |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
275 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
276 @anchor{semanticdb-save-database-hooks} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
277 @deffn Option semanticdb-save-database-hooks |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
278 Abnormal hook run after a database is saved. Each function is called |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
279 with one argument, the object representing the database recently |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
280 written. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
281 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
282 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
283 @node Semanticdb Search Configuration |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
284 @subsection Semanticdb Search Configuration |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
285 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
286 When another part of @semantic{} (or another Emacs package using |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
287 @semantic{}) queries the SemanticDB library for a source code tag, the |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
288 search need not be limited to tags defined within the current file. |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
289 It can include tags defined elsewhere, such as @dfn{header files} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
290 referenced by the current file (e.g., via the C/C++ @code{#include} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
291 directive). While performing the search, the SemanticDB library may |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
292 even automatically visit other files and parse them, if necessary. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
293 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
294 The variable @code{semanticdb-find-default-throttle} determines how |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
295 aggressively SemanticDB searches for source code tags. @xref{Search |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
296 Throttle}. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
297 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
298 The details of SemanticDB searches can vary from language to |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
299 language. In C/C++ code, for example, SemanticDB distinguishes |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
300 between @dfn{project header files} and @dfn{system header files}, |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
301 based on whether the @code{#include} directive uses the @code{""} or |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
302 @code{<>} filename delimiter. SemanticDB looks for system header in |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
303 the @dfn{system include path} (@pxref{Include paths}). |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
304 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
305 @menu |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
306 * Search Throttle:: Controlling how semanticdb searches occur |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
307 * Semanticdb Roots:: Specifying the root of different projects |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
308 * Include paths:: Add/Remove directories to include search paths |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
309 * Semanticdb search debugging commands:: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
310 @end menu |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
311 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
312 @node Search Throttle |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
313 @subsubsection SemanticDB Search Throttle |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
314 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
315 The SemanticDB @dfn{search throttle} determines how aggressive |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
316 SemanticDB searches are. It is controlled by the variable |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
317 @code{semanticdb-find-default-throttle}. The default value of this |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
318 variable aims for maximum accuracy, at the expense of search time. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
319 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
320 Other parts of the @semantic{} package, particularly the different |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
321 language parsers, may change the value of |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
322 @code{semanticdb-find-default-throttle}. You can override its value, |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
323 for a given major mode, like this: |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
324 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
325 @example |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
326 (setq-mode-local c-mode |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
327 semanticdb-find-default-throttle |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
328 '(project unloaded system recursive)) |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
329 @end example |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
330 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
331 @anchor{semanticdb-find-default-throttle} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
332 @defvar semanticdb-find-default-throttle |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
333 The default throttle for @code{semanticdb-find} routines. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
334 The throttle controls how detailed the list of database |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
335 tables is for a symbol lookup. The value is a list with |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
336 the following keys: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
337 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
338 @table @code |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
339 @item file |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
340 The file the search is being performed from. This option is here for |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
341 completeness only, and is assumed to always be on. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
342 @item local |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
343 Tables from the same local directory are included. This includes |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
344 files directly referenced by a file name which might be in a different |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
345 directory. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
346 @item project |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
347 Tables from the same local project are included If @code{project} is |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
348 specified, then @code{local} is assumed. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
349 @item unloaded |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
350 If a table is not in memory, load it. If it is not cached on disk |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
351 either, get the source, parse it, and create the table. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
352 @item system |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
353 Tables from system databases. These are specifically tables |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
354 from system header files, or language equivalent. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
355 @item recursive |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
356 For include based searches, includes tables referenced by included |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
357 files. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
358 @item omniscience |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
359 Included system databases which are omniscience, or somehow know |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
360 everything. Omniscience databases are found in |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
361 @code{semanticdb-project-system-databases}. The Emacs Lisp system |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
362 @var{db} is an omniscience database. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
363 @end table |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
364 @end defvar |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
365 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
366 @node Semanticdb Roots |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
367 @subsubsection SemanticDB project roots |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
368 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
369 The @code{project} setting in the SemanticDB search throttle |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
370 (@pxref{Search Throttle}) tells SemanticDB to search within the |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
371 current single code project. For @semantic{}'s point of view, |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
372 @dfn{projects} are determined by their top-level directories, or |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
373 @dfn{project roots}; every subdirectory of a project root is |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
374 considered part of the same project. |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
375 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
376 If you use EDE for project management, it will set the project roots |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
377 automatically. @xref{Top,,,ede,EDE manual}. You can also specify |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
378 them yourself. |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
379 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
380 @anchor{semanticdb-project-roots} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
381 @deffn Option semanticdb-project-roots |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
382 The value of this variable is a list of directories (strings) that are |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
383 project roots. All subdirectories of a project root are considered |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
384 part of the same project. This variable can be overriden by |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
385 @code{semanticdb-project-root-functions}. |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
386 @end deffn |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
387 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
388 @anchor{semanticdb-project-root-functions} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
389 @defvar semanticdb-project-root-functions |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
390 The value of this variable is a list of functions to determine a given |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
391 directory's project root. These functions are called, one at a time, |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
392 with one argument (the directory name), and must return either |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
393 @code{nil}, a string (the project root), or a list of strings |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
394 (multiple project roots, for complex systems). The first |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
395 non-@code{nil} return value, if any, is taken to be the project root, |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
396 overriding @code{semanticdb-project-roots}. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
397 @end defvar |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
398 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
399 @node Include paths |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
400 @subsubsection Include Paths |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
401 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
402 System include paths are standard locations to find source code tags, |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
403 such as the @dfn{header files} in @file{/usr/include} and its |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
404 subdirectories on Unix-like operating systems. |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
405 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
406 You can add and remove system include paths using the following |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
407 commands: |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
408 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
409 @anchor{semantic-add-system-include} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
410 @deffn Command semantic-add-system-include dir &optional mode |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
411 Prompts for a directory, @var{dir}, and add it as a system include |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
412 path for the current major mode. When called non-interactively, the |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
413 major mode can be specified with the @var{mode} argument. |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
414 @end deffn |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
415 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
416 @anchor{semantic-remove-system-include} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
417 @deffn Command semantic-remove-system-include dir &optional mode |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
418 Prompt for a directory, @var{dir}, and remove it from the system |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
419 include path for the current major mode (or @var{mode}). |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
420 @end deffn |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
421 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
422 @anchor{semantic-customize-system-include-path} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
423 @deffn Command semantic-customize-system-include-path &optional mode |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
424 Customize the system include path for the current major mode (or |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
425 @var{mode}). |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
426 @end deffn |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
427 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
428 @anchor{semanticdb-implied-include-tags} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
429 @defun semanticdb-implied-include-tags |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
430 Include tags implied for all files of a given mode. You can set this |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
431 variable with @code{defvar-mode-local} for a particular mode so that |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
432 any symbols that exist for all files for that mode are included. |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
433 @end defun |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
434 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
435 @c @xref{Search Optimization}, for more information on include paths. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
436 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
437 @node Semanticdb search debugging commands |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
438 @subsubsection Semanticdb search debugging commands |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
439 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
440 You can use @kbd{M-x semanticdb-dump-all-table-summary} to see the |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
441 list of databases that will be searched from a given buffer. You can |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
442 follow up with @kbd{M-x semanticdb-find-test-translate-path} to then |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
443 make sure specific tables from the path are discovered correctly. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
444 Alternately, you can get a list of include files @semantic{} |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
445 encountered, but could not find on disk using @kbd{M-x |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
446 semanticdb-find-adebug-lost-includes}. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
447 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
448 @deffn Command semanticdb-dump-all-table-summary |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
449 @anchor{semanticdb-dump-all-table-summary} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
450 Dump a list of all databases in Emacs memory. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
451 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
452 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
453 @anchor{semanticdb-find-test-translate-path} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
454 @deffn Command semanticdb-find-test-translate-path &optional arg |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
455 Call and output results of @dfn{semanticdb-find-translate-path}. In |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
456 the displayed buffer, you can type @key{SPC} to expand items. With |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
457 @var{arg} non-@code{nil}, specify a @var{brutish} translation. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
458 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
459 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
460 @deffn Command semanticdb-find-adebug-lost-includes |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
461 @anchor{semanticdb-find-adebug-lost-includes} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
462 Translate the current path, then display the lost includes. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
463 Examines the variable @code{semanticdb-find-lost-includes}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
464 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
465 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
466 Lastly, you can test an explicit search term using this command: |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
467 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
468 @deffn Command semantic-adebug-searchdb regex |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
469 @anchor{semantic-adebug-searchdb} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
470 Search the semanticdb for @var{regex} for the current buffer. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
471 Display the results as a debug list. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
472 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
473 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
474 @node Changing Backends |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
475 @subsection Changing Backends |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
476 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
477 If you want to use some other form of backend, you can use this |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
478 variable to choose which back end class to use for your general tag |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
479 storage. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
480 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
481 The default is to save databases in flat files. Alternatively, you |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
482 could write a new database backend that stores tags into a database, |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
483 or other storage system. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
484 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
485 @anchor{semanticdb-new-database-class} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
486 @defvar semanticdb-new-database-class |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
487 The default type of database created for new files. This can be |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
488 changed on a per file basis, so that some directories are saved using |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
489 one mechanism, and some directories via a different mechanism. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
490 @end defvar |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
491 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
492 @node Create System Databases |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
493 @subsection Create System Databases |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
494 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
495 If your supported language stores the system libraries in readily |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
496 available parsable source code, you can pre-generate database files |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
497 for them once, which will be used over and over for tools such as |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
498 summary-mode, or the analyzer. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
499 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
500 @deffn Command semanticdb-create-ebrowse-database dir |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
501 @anchor{semanticdb-create-ebrowse-database} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
502 Create an @var{ebrowse} database for directory @var{dir}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
503 The database file is stored in ~/.semanticdb, or whichever directory |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
504 is specified by @code{semanticdb-default-system-save-directory}. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
505 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
506 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
507 @node Idle Scheduler |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
508 @section Idle Scheduler |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
509 @cindex Idle Scheduler |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
510 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
511 The @dfn{Semantic idle scheduler} is a part of @semantic{} that |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
512 performs various operations while Emacs is waiting for user input |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
513 (idle time). Its primary job is to perform buffer parsing, but it is |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
514 also used for other purposes, such as displaying information about |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
515 tags. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
516 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
517 @anchor{global-semantic-idle-scheduler-mode} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
518 @deffn Command global-semantic-idle-scheduler-mode &optional arg |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
519 This command toggles Semantic Idle Scheduler mode in every |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
520 @semantic{}-enabled buffer. This minor mode ensures that the buffer |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
521 is automatically reparsed whenever Emacs is idle. If there is |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
522 additional idle time, it runs jobs scheduled by other parts of |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
523 @semantic{}, such as Semantic Idle Summary mode (@pxref{Idle Summary |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
524 Mode}) and Semantic Idle Completions mode (@pxref{Idle Completions |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
525 Mode}). |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
526 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
527 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
528 @anchor{semantic-idle-scheduler-idle-time} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
529 @deffn Option semantic-idle-scheduler-idle-time |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
530 The value of this variable is the amount of idle time, in seconds, |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
531 before the Semantic idle scheduler activates. The default is 1. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
532 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
533 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
534 @anchor{semantic-idle-scheduler-verbose-flag} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
535 @deffn Option semantic-idle-scheduler-verbose-flag |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
536 If this variable is non-@code{nil}, the idle scheduler prints verbose |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
537 messages while running, which are useful for debugging. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
538 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
539 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
540 @menu |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
541 * Reparsing Options:: Reparsing the current buffer in idle time |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
542 * Idle Working Options:: Options for extra work done at idle time |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
543 * Debugging Idle Time Issues:: How to produce good bug reports |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
544 * Idle Summary Mode:: Display prototype of symbol under cursor |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
545 * Idle Completions Mode:: Smart completion pop-up help |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
546 @end menu |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
547 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
548 @node Reparsing Options |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
549 @subsection Reparsing Options |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
550 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
551 When activated during idle time, the Semantic idle scheduler |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
552 automatically reparses all buffers that need it. Any arriving user |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
553 input cancels this, returning Emacs to its normal editing behavior. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
554 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
555 @anchor{semantic-idle-scheduler-max-buffer-size} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
556 @deffn Option semantic-idle-scheduler-max-buffer-size |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
557 Maximum size in bytes of buffers automatically reparsed. If this |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
558 value is less than or equal to @var{0}, buffers are automatically |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
559 reparsed regardless of their size. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
560 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
561 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
562 @anchor{semantic-idle-scheduler-no-working-message} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
563 @deffn Option semantic-idle-scheduler-no-working-message |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
564 If non-@code{nil}, disable display of working messages whie reparsing. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
565 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
566 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
567 @anchor{semantic-idle-scheduler-working-in-modeline-flag} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
568 @deffn Option semantic-idle-scheduler-working-in-modeline-flag |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
569 If non-@code{nil}, show working messages in the mode line. Normally, |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
570 re-parsing shows messages in the minibuffer; this moves the parse |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
571 message to the modeline instead. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
572 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
573 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
574 @anchor{semantic-before-idle-scheduler-reparse-hook} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
575 @defvar semantic-before-idle-scheduler-reparse-hook |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
576 This normal hook is run just before the idle scheduler begins |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
577 reparsing. If any hook function throws an error, the value of this |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
578 variable is reset to @code{nil}. This hook is not protected from |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
579 lexical errors. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
580 @end defvar |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
581 |
106151
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
582 @anchor{semantic-after-idle-scheduler-reparse-hook} |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
583 @defvar semantic-after-idle-scheduler-reparse-hook |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
584 |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
585 This normal hook is run after the idle scheduler finishes reparsing. |
9c5f5e4df2ac
* sem-user.texi (Semanticdb Search Configuration): Rearrange nodes.
Chong Yidong <cyd@stupidchicken.com>
parents:
106084
diff
changeset
|
586 If any hook throws an error, this variable is reset to @code{nil}. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
587 This hook is not protected from lexical errors. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
588 @end defvar |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
589 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
590 @node Idle Working Options |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
591 @subsection Idle Working Options |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
592 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
593 In addition to reparsing buffers, the Semantic idle scheduler performs |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
594 additional operations, including the following: |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
595 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
596 @itemize |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
597 @item |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
598 Creating the include path caches required for symbol lookup. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
599 @item |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
600 Create data type caches. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
601 @item |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
602 Saving SemanticDB caches to disk. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
603 @item |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
604 Speculatively parsing the files in the same directory as the current |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
605 buffer. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
606 @end itemize |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
607 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
608 Because this extra work is quite time-consuming, it is only carried |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
609 out after a longer idle delay. The following features control how the |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
610 idle work is performed. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
611 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
612 @anchor{semantic-idle-scheduler-work-idle-time} |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
613 @deffn Option semantic-idle-scheduler-work-idle-time |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
614 The value of this variable is the amount of idle time, in seconds, |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
615 before commencing idle work. The default is 60. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
616 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
617 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
618 @anchor{semantic-idle-work-parse-neighboring-files-flag} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
619 @deffn Option semantic-idle-work-parse-neighboring-files-flag |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
620 If the value of this variable is non-@code{nil}, the Semantic idle |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
621 scheduler uses idle work time to parse files in the same directory as |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
622 the current buffer. This improves the accuracy of tag searches and |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
623 saves time when visiting those files later, at the cost of doing a lot |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
624 of parsing. The default is @code{t}. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
625 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
626 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
627 @node Debugging Idle Time Issues |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
628 @subsection Debugging Idle Time Issues |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
629 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
630 If you see an error signalled during idle time, it could be an |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
631 indication of a more serious issue elsewhere. It is not enough to |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
632 enable @code{debug-on-error}, because the idle scheduler inhibits the |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
633 debugger. Instead, use the following commands to debug the error: |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
634 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
635 @deffn Command semantic-debug-idle-function |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
636 @anchor{semantic-debug-idle-function} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
637 Run the Semantic idle function with debugging turned on. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
638 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
639 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
640 @deffn Command semantic-debug-idle-work-function |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
641 @anchor{semantic-debug-idle-work-function} |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
642 Run the Semantic idle work function with debugging turned on. |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
643 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
644 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
645 @node Idle Summary Mode |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
646 @subsection Idle Summary Mode |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
647 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
648 Semantic Idle Summary mode is a minor mode that displays a short |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
649 summary of the symbol at point, such as its function prototype, in the |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
650 echo area. Its functionality is similar to what ElDoc mode provides |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
651 for Emacs Lisp (@pxref{Lisp Doc,,,emacs,Emacs manual}). |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
652 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
653 @anchor{global-semantic-idle-summary-mode} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
654 @anchor{semantic-idle-summary-mode} |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
655 @deffn global-semantic-idle-summary-mode &optional arg |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
656 This command toggles Semantic Idle Summary mode in all |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
657 @semantic{}-enabled buffers. You can also toggle it via the |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
658 @samp{Show Tag Summaries} menu item in the @samp{Development} menu. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
659 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
660 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
661 When Semantic Idle Summary mode is active, a summary of the tag at |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
662 point is displayed in the echo area. This display takes place during |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
663 the idle time, as given by @code{semantic-idle-scheduler-idle-time} |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
664 (@pxref{Idle Scheduler}). |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
665 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
666 You can override the method for getting the current tag to display by |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
667 setting @code{idle-summary-current-symbol-info}. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
668 |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
669 @anchor{semantic-idle-summary-function} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
670 @deffn Option semantic-idle-summary-function |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
671 The value of this variable should be a function to call to display tag |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
672 information during idle time. See the variable |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
673 @code{semantic-format-tag-functions} for a list of useful functions. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
674 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
675 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
676 @anchor{semantic-idle-summary-out-of-context-faces} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
677 @defvar semantic-idle-summary-out-of-context-faces |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
678 The value of this variable is a list of font-lock faces indicating |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
679 useless summary contexts. These are generally faces used to highlight |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
680 comments or strings. Semantic Idle Summary mode does not display its |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
681 usual summary if the text at point has one of these faces. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
682 @end defvar |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
683 |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
684 @node Idle Completions Mode |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
685 @subsection Idle Completions Mode |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
686 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
687 Semantic Idle Completions mode is a minor mode for performing |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
688 @dfn{code completions} during idle time. The completions are |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
689 displayed inline, with keybindings that allow you to cycle through |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
690 different alternatives. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
691 |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
692 Semantic Idle Completions mode performs completion based on the |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
693 Semantic Analyzer (@pxref{Analyzer}). |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
694 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
695 @anchor{global-semantic-idle-completions-mode} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
696 @anchor{semantic-idle-completions-mode} |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
697 @deffn global-semantic-idle-completions-mode &optional arg |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
698 This command toggles Semantic Idle Completions mode in every |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
699 @semantic{}-enabled buffer. You can also toggle it via the @samp{Show |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
700 Tag Completions} menu item in the @samp{Development} menu. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
701 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
702 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
703 If the tag at point has at least one completion, Semantic Idle |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
704 Completions mode displays that completion inline---i.e., as part of |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
705 the buffer text (you can change the display method by customizing |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
706 @code{semantic-complete-inline-analyzer-idle-displayor-class}, as |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
707 described below). The completed part is highlighted, to indicate that |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
708 it is not yet properly inserted into the buffer. The echo area shows |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
709 the completion, and whether there are other possible completions, like |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
710 this: |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
711 |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
712 @example |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
713 besselj [1 of 6 matches] |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
714 @end example |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
715 |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
716 @noindent |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
717 While the completion is being displayed, the following keybindings |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
718 take effect: |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
719 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
720 @table @kbd |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
721 @item @key{RET} |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
722 @itemx C-m |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
723 Accept the current completion (@code{semantic-complete-inline-done}), |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
724 placing it in the buffer and moving point to the end of the completed |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
725 tag. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
726 @item M-n |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
727 Select the next possible completion |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
728 (@code{semantic-complete-inline-down}). The new completion is shown |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
729 inline, replacing the old completion. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
730 @item M-p |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
731 Select the previous possible completion |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
732 (@code{semantic-complete-inline-up}). |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
733 @item @key{TAB} |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
734 @item C-i |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
735 Accept as much of the completion as possible. If no additional |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
736 completion can be accepted without ambiguity, select the next possible |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
737 completion (@code{semantic-complete-inline-TAB}). |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
738 @item C-g |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
739 Quit without completing (@code{semantic-complete-inline-quit}). |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
740 @end table |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
741 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
742 @noindent |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
743 You can also exit inline completion by issuing any other Emacs |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
744 command. The completion text then disappears from the buffer. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
745 |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
746 @anchor{semantic-complete-analyze-inline-idle} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
747 @deffn Command semantic-complete-analyze-inline-idle |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
748 This is the command for performing inline code completion. It is |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
749 called by Semantic Idle Completions mode during idle time, but you can |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
750 also call it yourself. It returns immediately, leaving the buffer in |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
751 a state for inline completion. |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
752 @end deffn |
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
753 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
754 @anchor{semantic-complete-inline-analyzer-idle-displayor-class} |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
755 @deffn Option semantic-complete-inline-analyzer-idle-displayor-class |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
756 The value of this variable determines how |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
757 @code{semantic-complete-analyze-inline-idle} shows its completions. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
758 Possible values include: |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
759 |
106156
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
760 @table @code |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
761 @item semantic-displayor-ghost |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
762 Display completions ``inline'' with the buffer text, as described |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
763 above. This is the default value. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
764 |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
765 @item semantic-displayor-tooltip |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
766 Display completions in a tooltip. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
767 |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
768 @item semantic-displayor-traditional |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
769 Display completions in a separate window. |
cf329ff7daa6
* sem-user.texi (Idle Completions Mode): More copyedits.
Chong Yidong <cyd@stupidchicken.com>
parents:
106151
diff
changeset
|
770 @end table |
106061
014672c3a25f
* Makefile.in: Build the Semantic manual.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
771 @end deffn |
106305
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
772 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
773 @node Analyzer |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
774 @section Analyzer |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
775 @cindex Analyzer |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
776 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
777 The Semantic Analyzer is a library for performing context analysis on |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
778 source code. It provides user commands for displaying, completing, |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
779 and navigating through source code. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
780 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
781 @menu |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
782 * Smart Completion:: Performing code completion. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
783 * Smart Summary:: Displaying help on a symbol. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
784 * Smart Jump:: Jumping to the definition of a tag. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
785 * Analyzer Debug:: Debugging problems with the analyzer. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
786 @end menu |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
787 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
788 @node Smart Completion |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
789 @subsection Smart Completion |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
790 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
791 The Semantic Analyzer can be used to perform code completion in a |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
792 manner that takes the local context into account. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
793 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
794 In addition to the user commands documented in this section, the |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
795 completions performed by Semantic Idle Completions mode also uses the |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
796 Semantic Analyzer. @xref{Idle Completions Mode}. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
797 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
798 @deffn Command semantic-analyze-possible-completions context |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
799 This is the most basic command for Semantic Analyzer-based completion. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
800 Called interactively, it displays in another window a list of the |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
801 possible completions for the symbol at point. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
802 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
803 When called from a Lisp program, |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
804 @code{semantic-analyze-possible-completions} does not display a |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
805 completions list. The argument @var{context} should be either a |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
806 buffer position, or a context object. The return value is a list of |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
807 @semantic{} tag objects that complete the symbol for @var{context}, |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
808 based on the following criteria: |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
809 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
810 @itemize |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
811 @item Elements currently in scope. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
812 @item Constants currently in scope. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
813 @item Elements matching the context's @code{:prefix}. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
814 @item Type of the completion matching the type of the context. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
815 @end itemize |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
816 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
817 Most of the other commands documented in this section call |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
818 @code{semantic-analyze-possible-completions} internally. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
819 @end deffn |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
820 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
821 @anchor{semantic-complete-analyze-inline} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
822 @deffn Command semantic-complete-analyze-inline |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
823 This command is bound to @kbd{C-c , @key{SPC}} when Semantic mode is |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
824 enabled (@pxref{Semantic mode user commands}). It displays a list of |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
825 possible completions for the symbol at point, and activates a special |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
826 set of keybindings for choosing a completion. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
827 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
828 You can type @key{RET} to accept the current completion, @kbd{M-n} and |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
829 @kbd{M-p} to cycle through the possible completions, @key{TAB} to |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
830 complete as far as possible and then cycle through completions, and |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
831 either @kbd{C-g} or any other key to abort the completion. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
832 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
833 This command is similar to the completion performed by Semantic Idle |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
834 Completions mode. The main difference is that it is called |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
835 explicitly, whereas Semantic Idle Completions mode completes during |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
836 idle time (@pxref{Idle Completions Mode}). |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
837 @end deffn |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
838 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
839 @anchor{semantic-complete-inline-analyzer-displayor-class} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
840 @deffn Option semantic-complete-inline-analyzer-idle-displayor-class |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
841 The value of this variable determines how |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
842 @code{semantic-complete-analyze-inline} shows its completions. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
843 Possible values include: |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
844 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
845 @table @code |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
846 @item semantic-displayor-traditional |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
847 Display completions in a separate window. This is the default value. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
848 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
849 @item semantic-displayor-ghost |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
850 Display completions ``inline'' with the buffer text, similar to the |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
851 default behavior of Semantic Idle Completions mode (@pxref{Idle |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
852 Completions Mode}). |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
853 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
854 @item semantic-displayor-tooltip |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
855 Display completions in a tooltip. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
856 @end table |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
857 @end deffn |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
858 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
859 In addition to @code{semantic-complete-analyze-inline}, you can use |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
860 the simpler command @code{semantic-ia-complete-symbol point}. This |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
861 behaves like the usual @kbd{M-@key{TAB}} (@code{complete-symbol}) |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
862 command (@pxref{Symbol Completion,,,emacs,Emacs manual}), except it |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
863 uses Semantic Analyzer. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
864 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
865 @anchor{semantic-ia-complete-symbol} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
866 @deffn Command semantic-ia-complete-symbol point |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
867 Complete the current symbol at @var{point}. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
868 @end deffn |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
869 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
870 @node Smart Summary |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
871 @subsection Smart Summary |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
872 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
873 You can use the commands in this section to find information about the |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
874 code at point: |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
875 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
876 @anchor{semantic-ia-show-summary} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
877 @deffn Command semantic-ia-show-summary pos |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
878 Display a summary for the symbol at @var{pos}. Called interactively, |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
879 @var{pos} defaults to point. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
880 @end deffn |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
881 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
882 @anchor{semantic-ia-show-doc} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
883 @deffn Command semantic-ia-show-doc pos |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
884 Display the code-level documentation for the symbol at @var{pos}. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
885 Called interactively, @var{pos} defaults to point. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
886 @end deffn |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
887 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
888 @anchor{semantic-ia-describe-class} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
889 @deffn Command semantic-ia-describe-class typename |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
890 Prompt for the name of a data type, @var{typename}, and display its |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
891 components. For instance, if the type in question is a class, this |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
892 displays the methods and member variables. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
893 @end deffn |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
894 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
895 You can also use Semantic Idle Summary mode to show information about |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
896 the current symbol in the echo area during idle time. @xref{Idle |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
897 Summary Mode}. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
898 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
899 @node Smart Jump |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
900 @subsection Smart Jump |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
901 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
902 The Semantic Analyzer can be used to jump directly to the definition |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
903 for a code symbol. Because it is based on code analysis, its behavior |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
904 is often more accurate than than the @code{find-tag} command |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
905 (@pxref{Tags,,,emacs,Emacs manual}). |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
906 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
907 @anchor{semantic-ia-fast-jump} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
908 @deffn Command semantic-ia-fast-jump pos |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
909 Jump to the definition for the symbol at @var{pos}. Called |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
910 interactively, @var{pos} defaults to point. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
911 @end deffn |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
912 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
913 @anchor{semantic-ia-fast-mouse-jump} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
914 @defun semantic-ia-fast-mouse-jump event |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
915 Jump to the definition for the symbol at the position of the mouse |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
916 event @var{event}. This command is meant to be bound to a mouse |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
917 command, like this: |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
918 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
919 @example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
920 (global-set-key '[(S-mouse-1)] semantic-ia-fast-mouse-jump) |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
921 @end example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
922 @end defun |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
923 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
924 You can also use @kbd{C-c , j} (@code{semantic-complete-jump-local}) |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
925 and @kbd{C-c , J} (@code{semantic-complete-jump}) to navigate tags. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
926 @xref{Semantic mode user commands}. Those commands do not make use of |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
927 the Semantic Analyzer. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
928 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
929 @node Analyzer Debug |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
930 @subsection Debugging the Semantic Analyzer |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
931 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
932 In the event that the Semantic Analyzer does not analyze your code |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
933 properly, you can take steps to identify and solve the problem. This |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
934 section was written with C/C++ in mind, but should be relevant for any |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
935 typed language. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
936 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
937 @subsubsection Step 1: Check the context |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
938 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
939 The first thing to do is check the current context. You can do this |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
940 with @kbd{M-x semantic-analyze-current-context}. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
941 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
942 @deffn Command semantic-analyze-current-context pos |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
943 Analyze the context at @var{pos}. This function is used by most of |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
944 the other Semantic Analyzer commands to obtain the context of the code |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
945 at a given buffer position. The return value is an EIEIO object |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
946 describing the context at @var{pos} (@pxref{Top,,,eieio,EIEIO |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
947 manual}). |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
948 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
949 When called interactively, this displays a @samp{*Semantic Context |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
950 Analysis*} buffer in a separate window. This buffer contains a |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
951 summary of the context at point. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
952 @end deffn |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
953 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
954 The Prefix section of the @samp{*Semantic Context Analysis*} buffer |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
955 lists the tags based on the text at point. If it shows only a simple |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
956 string, the Semantic was unable to identify what the data type was. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
957 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
958 The first item in the list of the prefix is the first lookup failure |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
959 in the chain, and that is the item to focus debugging effort on. For |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
960 example: |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
961 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
962 @example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
963 Context Type: #<semantic-analyze-context context> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
964 Bounds: (182 . 185) |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
965 Prefix: Foo* bar |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
966 int bbb (const char* y) |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
967 Prefix Types: class Foo @{@} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
968 -------- |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
969 -> Local Vars: int argc |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
970 char** argv |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
971 @end example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
972 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
973 In this example you can see that the prefix has two fully found tags. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
974 In the following example, the symbol ``bbb'' is incomplete, and could |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
975 not be found: |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
976 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
977 @example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
978 Context Type: #<semantic-analyze-context context> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
979 Bounds: (182 . 184) |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
980 Prefix: Foo* bar |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
981 "bb" |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
982 Prefix Classes: 'function |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
983 'variable |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
984 Prefix Types: class Foo @{@} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
985 -------- |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
986 -> Local Vars: int argc |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
987 char** argv |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
988 @end example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
989 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
990 @subsubsection Step 2 : Check your include path |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
991 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
992 Once you know what symbol can't be found, the next thing to check is |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
993 your include path. Is the header or include file that has the |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
994 definitions you need actually in the list of headers @semantic{} is |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
995 searching through? To get a basic list, you can use @kbd{M-x |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
996 semanticdb-find-test-translate-path}. @xref{Semanticdb search |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
997 debugging commands}. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
998 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
999 For C++, check to make sure that your project level include files are |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1000 in quotes, and not angle brackets. Items in angle brackets are system |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1001 includes. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1002 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1003 If items should be loaded but aren't, you may need to update the |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1004 search throttle. @xref{Search Throttle}. If you see some tables that |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1005 have 0 tags in them, then you you may have an incorrectly set |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1006 throttle. For example, |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1007 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1008 @example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1009 *#<semanticdb-table main.cpp (4 tags DIRTY)> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1010 *#<semanticdb-table foo.hh (0 tags DIRTY)> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1011 @end example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1012 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1013 Here, @semantic{} found @file{foo.hh}, but there are 0 tags. This may |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1014 be because the throttle was set to not read in and parse files that |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1015 Emacs has not yet loaded in. To fix this case, visit the file, and |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1016 let @semantic{} parse and save the tags table. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1017 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1018 @subsubsection Step 3: Check the local scope |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1019 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1020 If your data type is somehow abbreviated based on scope, such as from |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1021 a @code{using} statement, you should make sure that the symbol you |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1022 want is in the local scope. Examine the scope with @kbd{M-x |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1023 semantic-calculate-scope}. The scope structure is displayed in ADEBUG |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1024 mode, so use @kbd{SPC} to expand different elements and looking for |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1025 your symbol. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1026 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1027 If your symbol should be in the scope, but you cannot find it, then |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1028 you may have found a language support bug in the local-variable |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1029 parser, or using statement parser. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1030 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1031 Calling @kbd{M-x bovinte} should force a reset on the scope in case |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1032 there is merely some bad state. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1033 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1034 @example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1035 ] Name: Cache |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1036 ] Class: #'semantic-scope-cache |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1037 ] :table #<semanticdb-table testsubclass.cpp (13 tags DIRTY)> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1038 ] tag createMoose : class moose |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1039 ] scopetypes 'nil |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1040 ] parents #<TAG LIST: 1 entries> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1041 ] scope #<TAG LIST: 22 entries> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1042 ] fullscope #<TAG LIST: 23 entries> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1043 ] localvar #<TAG LIST: 6 entries> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1044 @end example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1045 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1046 In the above sample output, the @code{tag} slot specifies where within |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1047 you source this scope is relevant. @code{Parents} should contain any |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1048 in scope parents, such as the class a method belongs to. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1049 @code{Localvar} should contain your local variables. @code{Scope} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1050 should contain datatypes in scope due to a @code{using} statement or |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1051 the like. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1052 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1053 @subsubsection Step 4: Check the typecache |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1054 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1055 For complex typed languages like C++, @semantic{} creates a typecache, |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1056 or an optimized search table with all the various data types in it. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1057 Elements in the typecache do not obey local scope. It only contains |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1058 fully qualified names. You can examine the typecache with |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1059 @kbd{M-x semanticdb-typecache-dump}. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1060 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1061 If your data types are not in the typecache, there may be some parsing |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1062 error or other bug. Calling @kbd{M-x bovinte} should force a reset on |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1063 the typecache in case there is merely some bad state. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1064 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1065 @example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1066 ]#<semanticdb-typecache /home/zappo/cedet/semantic/tests/testsubclass.cpp> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1067 ] Name: /home/zappo/cedet/semantic/tests/testsubclass.cpp |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1068 ] Class: #'semanticdb-typecache |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1069 ] filestream 'nil |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1070 ] includestream #<TAG LIST: 84 entries> |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1071 ] stream 'nil |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1072 ] dependants 'nil |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1073 @end example |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1074 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1075 In the above example, the output of @kbd{M-x semanticdb-typecache-dump} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1076 was expanded one level. The @code{filestream} slot should contain |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1077 datatypes in the current file. The @code{includestream} should |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1078 contain all the datatypes in all included header files. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1079 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1080 The @code{dependants} slot will specify other files that depend on |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1081 this one. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1082 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1083 @section Step 5: Check the parser |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1084 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1085 Go to the location where your unfound tag should be. You can call |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1086 @kbd{M-x bovinate}, and see a dump of the raw tag structure. To see a |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1087 navigable tree, use @kbd{M-x semantic-adebug-bovinate} instead. You |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1088 can then look to make sure your tag has been properly parsed. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1089 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1090 If it has not, then you may have found a parser bug. To get a feel |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1091 how @semantic{} treats your file, type @kbd{M-x |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1092 global-semantic-show-unmatched-syntax-mode}. This causes any syntax |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1093 it cannot parse to be underlined in red. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1094 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1095 If your type is not parsable, it could be for a couple of reasons: |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1096 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1097 @enumerate |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1098 @item |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1099 If there is a MACRO keyword used in the definition of the type, you |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1100 may need to update the @code{semantic-lex-c-preprocessor-symbol-map} |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1101 to account for it. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1102 |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1103 @item |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1104 Or perhaps the parser needs to be fixed. |
0b797c8cfed8
* semantic.texi (Analyzer Internals): Rename from Analyzer.
Chong Yidong <cyd@stupidchicken.com>
parents:
106156
diff
changeset
|
1105 @end enumerate |