Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [c]

is for C source code editing, completions, formatting, compiling, folding, searching, executing, syntax checking, debugging, and other modern IDE features that Emacs supports.

Filter by
Sorted by
Tagged with
7 votes
2 answers

How to transpose two arguments of a function call for C family languages?

How to swap two arguments for C function calls? eg: my_function(foo, bar, baz); ~~~~~~~~~~~~~^ (cursor location) Should be transposed to the right to make: my_function(bar, foo, baz); The simple ...
ideasman42's user avatar
  • 8,826
5 votes
3 answers

Syntax highlight doxygen comments in C/C++? (c-doc-comment-style)

Is it possible to syntax highlight doxygen in C/C++ code? QtCreator and Vim both support basic highlighting so \param, \note... etc are highlighted differently.
ideasman42's user avatar
  • 8,826
21 votes
1 answer

How to automatically create neat C comment blocks while typing?

Some code editors such as eclipse automatically form neat blocks when you start typing a multi-line comment: Is there some package or another way to do this in emacs too? Edit: To clarify: I do not ...
Geier's user avatar
  • 732
11 votes
3 answers

How can I automatically insert a prototype in foo.h from foo.c?

Suppose I'm writing a C program in a file foo.c: int add_numbers(int x, int y, int z) { // Very complex implementation here. return x + y + z; } I want a command that will insert a ...
Wilfred Hughes's user avatar
8 votes
2 answers

Hook that indicates when the cursor has been moved by scrolling

Inspired by this question: Let Emacs move the cursor off-screen, I am considering writing a minor mode that will keep the cursor in a fixed position that is not affected by scrolling operations. I ...
nispio's user avatar
  • 8,235
7 votes
4 answers

How do I disable ffap (find file at point) when the first two non-space characters in a line are '//'?

In Verilog/C/C++, comments can begin with //. Here's an example comment, //This is a comment I like to use the find-file-at-point feature. If my cursor is on the file name in `include "some_file.v"....
Kaushal Modi's user avatar
  • 25.7k
2 votes
1 answer

Auto-complete C/C++ functions

I want code completion for C/C++ functions and variables from headers. I tried to install Auto-complete and Company, but C/C ++ functions/variables aren't complemented. Here is the relevant portion ...
drfels's user avatar
  • 123
2 votes
2 answers

Automatically insert a space in some C expressions

The corporate rules about indention forces us to surround our if conditions with spaces like this (in a C and C++ codebase) : if (<space>foo == bar<space>) { } Is there any emacs tool ...
Guid's user avatar
  • 121
1 vote
0 answers

Doxygen style for c-doc-comment-style? [duplicate]

The option c-doc-comment-style supports javadoc, autodoc and gtkdoc. Is there a way to get doxygen support? (\returns, \note, \brief... etc)
ideasman42's user avatar
  • 8,826
0 votes
1 answer

auto-complete-c-headers just works with C. No result with C++

I installed the auto-complete-c-headers package and added the following in my Emacs configuration file ; start auto-complete with emacs (require 'auto-complete) ; do default config for auto-complete (...
user avatar