summaryrefslogtreecommitdiff
path: root/misc/format.el
diff options
context:
space:
mode:
Diffstat (limited to 'misc/format.el')
-rw-r--r--misc/format.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/format.el b/misc/format.el
new file mode 100644
index 00000000..c0901142
--- /dev/null
+++ b/misc/format.el
@@ -0,0 +1,5 @@
+(setq c-basic-offset 4)
+(if (not (word-search-forward "Mode: C" nil t))
+ (insert-string "/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */\n\n"))
+(mark-whole-buffer)
+(indent-region (region-beginning) (region-end) nil)