Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c-mode]

The tag has no usage guidance.

0
votes
1answer
180 views

cuda .cu files indentation issue. How i can set indentation for cuda .cu files to 4 spaces?

In my .emacs i have put following for cuda highlighting: (setq c-default-style '(("c++" . "linux") (java-mode . "java") (awk-mode . "awk") ...
0
votes
1answer
61 views

Elisp-Function to always insert “*/” in C-Mode when “/*” was typed

I want to implement the functionality, that i wrote about in the title. Since searching the web for existing solutions didn't give me anything useful, i figured i would just try and implement it ...
0
votes
1answer
31 views

Which value for topmost-intro-cont, to align variable names in c-mode?

In c-mode, how to align following code so, that the second variable name's starting character (A) is aligned below the first variable name's starting character (V)? static unsigned int V_name_1, ...
0
votes
0answers
336 views

spacemacs change c++ style

I want to change c-mode style like below on spacemacs. (This setting works fine on Emacs.) (defun my-c-mode-hook () (c-set-style "bsd") (setq tab-width 4) (c-set-offset 'case-label '+) (setq ...
0
votes
0answers
30 views

How to define a custom code style for C/C++ to be shared with others?

I have my own code style setup in my init.el file, but would like to publish it for other developers to use. Is there a good template to use so projects can share their C/C++ code style between ...
1
vote
1answer
72 views

Make wide string literal for C/C++

Is there function/package that allows to make "wide string literals" as defined by C/C++ standards. That is, where one has to replace all non-ascii characters with escaped "\x.." sequences.
1
vote
1answer
44 views

how to change C-mode syntax so that the token @' is ignored?

I edit some files that are mostly C code but include a few special extension tokens. The tokens that give c-mode a problem are @' and @". I essentially want c-mode to ignore these two bigrams. The ...
1
vote
1answer
195 views

Part II — Colorizing `functions/variables' within comments in `c-mode'

I have implemented the solution of Yasushi Shoji in a previous thread -- Colorizing `functions/variables' within comments in `c-mode' -- to highlight Lisp function/variable names in c-mode ...
4
votes
1answer
207 views

Colorizing `functions/variables' within comments in `c-mode'

I am working with the C-source code of Emacs using the built-in c-mode, and would like Emacs to automatically highlight functions and variables within comments with a different color: In the ...
0
votes
1answer
73 views

Why does font-lock for comment work in cpp, but not in c?

This comment gets font-lock-comment-face in C++ mode, but not in C mode: /** * \file test.cpp * */ If I add another * to /** -> /***, it's working in C-mode, too... I'm not aware of any ...
6
votes
2answers
431 views

Automatically closing #ifdef block when editing C code

When editing LaTeX code, the command latex-close-block inserts an \end{..} that matches the last unclosed \begin{..}. Very handy! Is there a similar command in c-mode that would close a pending #...
4
votes
2answers
635 views

CC-Mode - Javadoc Comment Colors in C/C++

I've been fiddling around a bit with CC-mode lately and figured that since I prefer to comment my functions/classes with javadoc-like syntax, I'd like to use the built-in comment highlighting provided ...
4
votes
1answer
172 views

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 (...