Emacs Auto-include in C

When using java and eclipse, there is a button for automatically turning on any standard libraries that you need to enable. Is there a similar option for C and emacs to save writing efforts from the standard library?

+4
source share
1 answer

Unfortunately, I don’t think so. In general, such a function requires the ability to completely parse C code and the only part of Emacs that can do this is CEDET. CEDET has a lot of infrastructure for adding features, so this will be the place to look.

However, C a lack of namespaces would create something similar to this error prone. Often, most of them are specific to applications, so I don’t see anything that is limited to stdlib, which is incredibly useful.

You can save yourself the spelling of yas-snippets , but it's still a long way to automatically magically detect your inclusions.

+1
source

Source: https://habr.com/ru/post/1390106/


All Articles