[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Semantic should be installed as a part of the CEDET distribution. See the cedet/INSTALL file in the cedet distribution for basic installation instructions.
2.1 Canned Configuration | ||
2.2 Search Optimization | ||
2.3 Parsing Optimization |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
As described briefly in the cedet/INSTALL file, there are several canned configurations you can use. These configuration files just turn different semantic modes on and off, but don't change intrinsic semantic parsing behaviors.
semanticdb-minor-mode
Compatibility:
semantic-load-enable-gaudy-code-helpers
introduced in semantic version 2.0 supercedes
semantic-load-enable-guady-code-helpers
which is now obsolete.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A common use of semantic is for smart completion and tag browsing. These operations involve searching through the tags of your files. For complete documentation on configuring your searches, @xref{(semantic-user)Semanticdb Search Configuration}.
The default configuration is for fast searches that may not find your symbols all the time.
Searching is controlled with semanticdb-find-default-throttle
.
To force the search to find and read and tag files not yet in memory,
you might add code like this for C mode.
(setq-mode-local c-mode semanticdb-find-default-throttle '(project unloaded system recursive)) |
Finding unloaded databases requires knowing the search path. You can find headers on a system or project level search path. @xref{(semantic-user)Include paths}.
If using the above tactic doesn't work for your language (something other than C/C++), it may be that your language isn't configured properly for finding include files. You would need to refer to the @xref{(semantic-langdev)} for details.
If you were to be working on a linux kernel, you might opt to configure your search path in your `.emacs' file with code like this:
(semantic-reset-system-include 'c-mode) (semantic-add-system-include "/usr/src/linux-2.4/include" 'c-mode) |
It is also useful to find and install extra search engine back-ends, such @xref{(semantic-user)Create System Databases}. Ebrowse is one such back-end for C and C++ code.
You might create an ebrowse database for your C include files like this:
M-x semanticdb-create-ebrowse-database RET /usr/include/ RET |
This will create the database, save it, and add it to the database search list for your C and C++ based projects. These databases will be created in your `~/.semanticdb' directory to be reloaded in future Emacs sessions.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The semantic parsers generate the tags that form the basis of all the semantic based tools, such as browsers and completion. Keeping those tags up to date can have performance implications.
Here are some common tasks you may be interested in:
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can inhibit parsing using the semantic-inhibit-functions
variable.
nil
, the current buffer is not
setup to use Semantic.
You could have this inihibit parsing in very large files, or files which case particular problems to semantic.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Tags are usually kept up to date when Emacs is idle @xref{(semantic-user)Idle Scheduler}. The semantic's idle-scheduler automatically updates the tags in various buffers before executing specific idle modes, such as summary mode.
You might choose to tune the scheduler with some code like this in your `.emacs' file:
;; Increase the delay before activation (setq semantic-idle-scheduler-idle-time 10) ;; Don't reparse really big buffers. (setq semantic-idle-scheduler-max-buffer-size 100000) |
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by XEmacs shared group account on December, 19 2009
using texi2html 1.65.