summaryrefslogtreecommitdiffstats
path: root/lisp/ravi-init-cpp.el
diff options
context:
space:
mode:
authorRavi R Kiran <aine.marina@gmail.com>2017-05-24 03:06:34 (GMT)
committerRavi R Kiran <aine.marina@gmail.com>2017-05-24 03:06:34 (GMT)
commitda9f91a2b92aea8f2f4193295e2a44a0afdec167 (patch)
tree1044fa2f1b748bfb723f3a20254fa85b907f912f /lisp/ravi-init-cpp.el
parentfd9efcd9eb35e93facd607831648ab5f71878b31 (diff)
downloaddotemacs-da9f91a2b92aea8f2f4193295e2a44a0afdec167.zip
dotemacs-da9f91a2b92aea8f2f4193295e2a44a0afdec167.tar.gz
dotemacs-da9f91a2b92aea8f2f4193295e2a44a0afdec167.tar.bz2
Headers guards are essentially obsolete
Diffstat (limited to 'lisp/ravi-init-cpp.el')
-rw-r--r--lisp/ravi-init-cpp.el14
1 files changed, 4 insertions, 10 deletions
diff --git a/lisp/ravi-init-cpp.el b/lisp/ravi-init-cpp.el
index 9880fb6..e99e132 100644
--- a/lisp/ravi-init-cpp.el
+++ b/lisp/ravi-init-cpp.el
@@ -307,15 +307,9 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named
;; Creates the ifndef/define/endif statements necessary for a header file
(defun header-protection ()
(interactive)
- (let ((s (kde-header-protection-definable-string)))
- (save-excursion
- (goto-char (point-min))
- (insert "#ifndef " s "\n#define " s "\n\n")
- (goto-char (point-max))
- (insert "\n#endif\n")
- )
- )
- )
+ (save-excursion
+ (goto-char (point-min))
+ (insert "#pragma once\n\n")))
(defun ravi-start-c++-header ()
"Start a new C++ header by inserting include guards ( see \
@@ -339,7 +333,7 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named
)
(end-of-buffer)
- (next-line -3)
+ (next-line -1)
(insert "\n")
(doxymacs-insert-file-comment)
)