aboutsummaryrefslogtreecommitdiff
path: root/Emacs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-09-28 16:29:19 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-09-28 16:32:03 +0100
commit790d4dc86e66518cef6b8383fd6d0c7e089304ac (patch)
treec9d50d29f70183577a419d5dc8c5ed825dbb866a /Emacs
parent08679e967a9a1ed9548199d0c7e2aeb3e1f8b3e7 (diff)
downloaddotfiles-790d4dc86e66518cef6b8383fd6d0c7e089304ac.tar.gz
dotfiles-790d4dc86e66518cef6b8383fd6d0c7e089304ac.tar.bz2
dotfiles-790d4dc86e66518cef6b8383fd6d0c7e089304ac.zip
(Emacs)+header auto-insert with copyright notice.
Diffstat (limited to 'Emacs')
-rw-r--r--Emacs/.config/emacs/config.org10
1 files changed, 10 insertions, 0 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index 7fa7db8..4d32779 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -3092,6 +3092,16 @@ Tons of stuff, namely:
" * Description: " _ "\n"
" */\n"
"\n")
+ (("\\.\\([Hh]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'" . "C / C++ header")
+ (replace-regexp-in-string "[^A-Z0-9]" "_"
+ (string-replace "+" "P"
+ (upcase
+ (file-name-nondirectory buffer-file-name))))
+ "/* " (+license/insert-copyright-notice) "\n\n"
+ " * Created: " (format-time-string "%Y-%m-%d") "\n"
+ " * Author: " user-full-name "\n"
+ " * Description: " _ "\n*/"
+ "#ifndef " str n "#define " str "\n\n" "\n\n#endif")
:config
(c-add-style
"user"