Questions tagged [semantic-mode]
27 questions
12
votes
3 answers
How can I get C/C++ context-sensitive completion with Company?
Semantic seems to be able to do this, but I cannot get it to work as I would expect it to. For example, if I #include "Type.h" and declare Type t, using semantic-complete-analyze-inline when point is after t. consistently gives me the error
Cannot…

Sean Allred
- 6,861
- 16
- 85
12
votes
2 answers
How to get semantic syntax highlighting on emacs for C/C++ code
I'm new to emacs and programming in general so please bear with me. I'm trying to use emacs as my C/C++ IDE, and I noticed that in CC mode the variables/functions seemed to be highlighted only during declaration. My question is
Is it possible to…

DJ lee
- 131
- 1
- 4
8
votes
2 answers
How to activate semantic-mode for specific major modes only?
I've seen this question a lot. But none of the replies fixed my issue: the minor mode stays on in others modes.
So far, I have tried:
(use-package stickyfunc-enhance
:config
;; (add-to-list 'semantic-default-submodes…

Mathieu Marques
- 1,953
- 1
- 13
- 30
7
votes
0 answers
How do I parse a simple grammar and obtain a syntax tree in Emacs lisp?
How can I construct a parse tree from a string and a simple grammar? Semantic seems very tricky, and SMIE does not seem to produce a parse tree.
Here's an example, assuming a language that looks like this:
BLAH [ FOO "aaa"; "bbb" | BAR [ "ccc" |…

Clément
- 3,924
- 1
- 22
- 37
6
votes
0 answers
Code blocks in font-lock comments
I'm developing a major mode for a language that has doc comments. They look like this:
(** Foos three bars.
Better call this as [foo 1 b c].
Though of course [foo a b 1] works as well. **)
Definition foo a b c := a + b - c.
In that context…

Clément
- 3,924
- 1
- 22
- 37
5
votes
2 answers
Detecting variable changed outside customize
I have used "Customize" to set a value for semantic-lex-c-preprocessor-symbol-file. However, after loading up .emacs, this isn't the value I see. On opening up the "Customize" menu for this variable, I see that its state is "Changed outside…

Pradhan
- 2,330
- 14
- 28
4
votes
1 answer
Semantic occur?
Is there a way to get an occur-style summary that contains all of the function definitions of the current file? Perhaps using semantic-mode?
I'm particularly concerned about C. Emacs Lisp, Caml (tuareg-mode) and Haskell would be welcome additions,…

jch
- 5,680
- 22
- 39
3
votes
1 answer
Long pause after typing `std::` when using semantic with auto-complete
I am using auto-complete-mode with ac-c-headers and whenever I type std:: There is a long (~30 seconds) pause, presumably while the candidates list is populated. This happens every time, which suggests that there is no caching to speed things up…

nispio
- 8,175
- 2
- 35
- 73
3
votes
1 answer
Can't have semantic-mode turned on for Python buffers only
I'm trying to activate semantic-mode for Python buffers only:
(use-package stickyfunc-enhance
:init
(require 'stickyfunc-enhance)
(add-to-list 'semantic-default-submodes 'global-semantic-stickyfunc-mode)
:config
(defun…

Mathieu Marques
- 1,953
- 1
- 13
- 30
3
votes
0 answers
Class inheritance tree in ECB
I'd like to see the inheritance tree for classes which I have currently open, similarly to how it ECB shows related files (e.g. I have a class B in my buffer, its parent A and child C are in different files - show me a tree with classes A, B, C).
I…

mkollaro
- 93
- 1
- 4
2
votes
1 answer
Semantic not parsing Elisp files
Here's my Semantic config:
(semantic-mode 1)
So my config probably isn't the issue.
Whenever I try to use Semantic commands in an elisp file, I get the message Buffer was not parsed by Semantic.. So I tried doing semantic-force-refresh and it says,…

nanny
- 5,704
- 18
- 38
2
votes
1 answer
Global semantic summary mode not enabled at startup
I have used customize-group on semantic to set global-semantic-idle-summary-mode to t. My .emacs has this entry in custom-set-variables : '(global-semantic-idle-summary-mode t).
However, on starting emacs and opening a C++ source file, I don't see…

Pradhan
- 2,330
- 14
- 28
2
votes
0 answers
How to remove unwanted candidates from helm-semantic-or-imenu?
Helm has inbuilt function helm-semantic-or-imenu. When this function is called, it shows all candidates including variables, dependencies e.t.c.
I mostly use it only for functions and classes. I want to remove all other candidates and include only…

Chillar Anand
- 4,042
- 1
- 23
- 52
1
vote
1 answer
Semantic does not reload c-preprocessor symbols from file
semantic allows specification of C-preprocessor keywords using the variable semantic-lex-c-preprocessor-symbol-file, which is a list of C/C++ files that contain preprocessor macros. How do I get semantic to reload these files after changing one of…

Pradhan
- 2,330
- 14
- 28
1
vote
1 answer
Issues setting up Java code completion in CEDET. Cannot find semantic/db-javap
The line below is in my init file:
(require 'semantic/db-javap)
it is causing the following error message:
Debugger entered--Lisp error: (file-error "Cannot open load file" "semantic/db-javap")
require(semantic/db-javap)
eval((require (quote…

Ben Weintraub
- 13
- 2