5

color-identifiers-mode does this for variables, if I understand your question correctly. rainbo-identifiers-mode too, I think. Screenshot is from the former one.


5

If you use Helm, then yes, there's helm-semantic-or-imenu command. Demo with C: Demo with Emacs Lisp: For Caml and Haskell, you can use this command but there's probably only Imenu support (so you won't get full function interface like the above 2 demos).


4

It is not easy to find where such a change was made. The easiest way to find it is to recursively bisect your init file, to find out which part of it causes this. To do that you can use command comment-region. With C-u it uncomments the region. Comment out 1/2, then 3/4, then 7/8, then 15/16,... of your init file. Beyond that, code such as this will ...


2

Emacs version 26.1 and higher allows you to trigger the debugger when a variable changes. Place the following code near the beginning of your init.el: (debug-on-variable-change 'semantic-lex-c-preprocessor-symbol-file) Restart your emacs. Each time the variable is changed, you'll enter the debugger with the corresponding backtrace. After each occurence you ...


2

You achieve that by customizing semantic-inhibit-functions. From the documentation (C-hvsemantic-inhibit-functionsRET List of functions to call with no arguments before Semantic is setup. If any of these functions returns non-nil, the current buffer is not setup to use Semantic. (defun my-inhibit-semantic-p () (not (equal major-mode 'python-mode))) ...


2

The best solution I have found to restrict semantic-mode to certain buffers only is to set semantic-inhibit-functions. For example you can add a function that inhibits semantic in buffers not in python mode as follows (defun my-inhibit-semantic-p () (not (equal major-mode 'python-mode))) (with-eval-after-load 'semantic (add-to-list 'semantic-...


2

Looking at the source code in semantic.el, it looks like semantic-mode is a global minor mode. So once activated, it will be activated in all the buffers; and once deactivated, it will be deactivated in all. You can probably have something like below that enables semantic mode only when you open a specific mode buffer (but I am not sure how well it will ...


2

You can use M-x bovinate to see what the parser will dump. On the file you linked it's fairly obvious from the output that it gets stuck near the class definition. The offending token is AbstractLifecycleComponent<Transport>. You can test this yourself by deleting the "extends" portion of that class definition and trying again. This is a problem with ...


2

In a buffer with only the line const char* fileName as above, running (semantic-fetch-tags) returns this tag that gives back char as type: (("filename" variable (:pointer 1 :constant-flag t :type "char") nil #<overlay from 1 to 22 in 03-095759.c>)) The type is "char", although it has the attribute :pointer 1 to denote the level of pointer. helm-...


2

Semantic should parse only when Emacs is idle. The variable semantic-idle-scheduler-idle-time is the amount of idle time, in seconds, before the Semantic idle scheduler activates.


2

so why is this the only file missing? Because the CEDET guys feel that the Java support hasn't received enough attention (development, testing, adoption) to be ready for inclusion into Emacs. To use it, you'll have to install the upstream CEDET, or maybe Alex Ott's branch (see this question and answer). And what can I do to fix it? Show some activity ...


2

Short answer: The full semantic tags are shown in the minibuffer if semantic-idle-truncate-long-summaries is customized to nil and eldoc-echo-area-use-multiline-p is customized to non-nil. The not so short answer: The eldoc message is generated by semantic-idle-summary-idle-function. This function really considers eldoc-echo-area-use-multiline-p. If eldoc-...


2

I did run into trouble. Emacs would become unresponsive trying to complete code and at other times when I do not know what was executing. I disabled Semantic again and Emacs went back to normal again. So one clearly need to do some more configuration to run Company and Semantic concurrently, the only question is what.


1

I have followed the directions at this blog which supplements the C ide stuff by Tudho to install rtags and irony (as suggested by Dmitry) and it provides the features I asked for. I'll expand with a summary of steps I had to take to get it all working on a Mac: Install a recent version of the clang compiler with macports (likely optional) Set environment ...


1

I've hit this same problem before and I "solved" it by changing the value of ac-delay from 0.1s to 1.0, like so: (set-variable 'ac-delay 1.0) That means that as I'm typing it only attempts the auto-complete if I stop typing for a second. So if you know you want a std::vector you can just keep typing and auto-complete never fires.


1

Just add (semantic-add-system-include "/usr/include/gtk-3.0/"). It is because you use include your header as #include <gtk/gtk.h>, so the file you included will be found when the two paths are combined. It is the same thing for other packages or editors out there.


1

semantic uses the variable semantic-lex-c-preprocessor-symbol-map to store the C preprocessor keywords used by its C lexer. The function semantic-c-reset-preprocessor-symbol-map reconstructs this table using all the various input methods. So, on changing a file listed in semantic-lex-c-preprocessor-symbol-file, run (semantic-c-reset-preprocessor-symbol-map) ...


1

I solved this problem by downloading and installing a recent snapshot of CEDET from here: http://www.randomsample.de/cedet-snapshots/ I used this snapshot: cedet_snapshot-rev_8698.tar.gz 29-Dec-2014 21:00 1.5M I guess the version shipped with this version of Emacs is broken.


1

I've just patched moo-jump-local to properly handle const char* fileName. It seems that semantic can't currently parse top-level references. Although it parses them in the arguments lists, as you can see here:


1

I also had this problem, then I updated it to latest bzr and the problem goes away. You can checkout the bzr version: bzr checkout bzr://cedet.bzr.sourceforge.net/bzrroot/cedet/code/trunk cedet cd cedet make cd contrib make Then load your Emacs with the new CEDET. You must load it at the very start of your init.el otherwise once the built-in CEDET is ...


1

I suggest using irony-mode with company-irony for completion instead of semantic as semantic is generally too slow and simplistic - ie. it often doesn't offer completions when you would think it should.


Only top voted, non community-wiki answers of a minimum length are eligible