~pkal/auto-header

Automatically find the right headers
Bump version to 0.1.2 to publish last change
Clarify what is meant by "header" files

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~pkal/auto-header
read/write
git@git.sr.ht:~pkal/auto-header

You can also use your local clone with git send-email.

#Guess and insert C headers

Find here the source for auto-header.el, an Emacs minor mode that can automatically guess what headers to prepend to a C file using information from Man pages.

Note: The insertion mechanism is currently primitive and might mess up files with fragile or complicated #ifdef constructs.

#Installation

Auto-header.el is avaliable from GNU ELPA. It can be installed by invoking

M-x package-install RET auto-header RET

#Usage

You can have auto-header run every time a buffer is saved, by modifying before-save-hook using the auto-header-mode minor mode:

(add-hook 'c-mode-hook #'auto-header-mode)

Keep in mind that auto-header.el was only written for C in mind, and will emit a warning when used with other major modes.

#Contribute

As auto-header.el is distributed as part of GNU ELPA, and therefore requires a copyright assignment to the FSF, for all non-trivial code contributions.

#Source code

Auto-header.el is developed on SourceHut.

#Bugs and Patches

Bugs, patches, comments or questions can be submitted to my public inbox.

#Distribution

Auto-header.el and all other source files in this directory are distributed under the GNU Public License, Version 3 (like Emacs itself).