From 790d4dc86e66518cef6b8383fd6d0c7e089304ac Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 28 Sep 2023 16:29:19 +0100 Subject: (Emacs)+header auto-insert with copyright notice. --- Emacs/.config/emacs/config.org | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Emacs/.config/emacs/config.org') 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" -- cgit v1.2.3-13-gbd6f