emacs.d

My emacs configuration, done in a literate programming fashion using org-mode

git clone git://git.shimmy1996.com/emacs.d.git
commit d9c9b939ed66f9943d373f53f7bb2745b49d5cae
parent 8251d806d1f31421c2870bd34b409c9c2f80c62e
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sat, 30 Dec 2017 15:45:54 -0600

Corrected typos and adding snippets.

Diffstat:
MREADME.org | 6+++---
Minit.el | 3++-
Asnippets/c++-mode/ifndef | 8++++++++
Asnippets/makefile-gmake-mode/maketemp | 12++++++++++++
4 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
@@ -597,7 +597,7 @@ Google's C/C++ style for c-mode.
     :ensure t
     :init
     (add-hook 'c-mode-common-hook 'google-set-c-style)
-    (add-hook 'c-mode-common-hook 'google-make-newline-indent)
+    (add-hook 'c-mode-common-hook 'google-make-newline-indent))
 #+END_SRC
 
 ** Treat =.h= as C++
@@ -643,9 +643,9 @@ On Arch Linux, if using AUR package =cpplint=, need to modify command in =flyche
          (require 'flycheck-google-cpplint)
          ;; Add Google C++ Style checker.
          ;; In default, syntax checked by Clang and Cppcheck.
-         ;; Use Google Checker after there are no warnings are cleared
+         ;; Use Google Checker after errors are cleared
          (flycheck-add-next-checker 'c/c++-cppcheck
-                                    '(warning . c/c++-googlelint)))))
+                                    '(error . c/c++-googlelint)))))
 #+END_SRC
 
 *** Set Checker Parameters
diff --git a/init.el b/init.el
@@ -16,7 +16,8 @@
       (re-search-forward
        (format "^\\*\\{1,%d\\} " (length (match-string 1)))
        nil 1)
-      (beginning-of-line))
+      (forward-line -1)
+      (end-of-line))
      ;; Log ENABLED Subtrees
      ((looking-at "^\\*+ \\(ENABLED\\|\\).*$")
       (message "%s" (match-string 0)))
diff --git a/snippets/c++-mode/ifndef b/snippets/c++-mode/ifndef
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: ifndef
+# key: ifndef
+# --
+#ifndef ${1:FOO_H_}
+#define $1
+$0
+#endif // $1
diff --git a/snippets/makefile-gmake-mode/maketemp b/snippets/makefile-gmake-mode/maketemp
@@ -0,0 +1,12 @@
+# -*- mode: snippet -*-
+# name: maketemp
+# key: maketemp
+# --
+CC = ${1:clang++}
+CFLAGS = -std=c++14 -Wall
+
+${2:test}: $2.cc
+	$(CC) $(CFLAGS) $< -o $@
+clean:
+	rm ./$2
+$0