]> code.delx.au - dotemacs/commitdiff
Soy/Closure templates
authorJames Bunton <jbunton@atlassian.com>
Sat, 12 Aug 2017 05:04:51 +0000 (15:04 +1000)
committerJames Bunton <jbunton@atlassian.com>
Sat, 12 Aug 2017 05:05:08 +0000 (15:05 +1000)
.gitmodules
lisp/my-file-modes.el
packages/cl-closure-template [new submodule]

index 48812c22d89898c6cf26afa144a39377f8da675c..f3e77a56b19969e45e62cbaf706ba7a34e627f41 100644 (file)
 [submodule "wgrep"]
        path = packages/wgrep
        url = https://github.com/mhayashi1120/Emacs-wgrep.git
+[submodule "cl-closure-template"]
+       path = packages/cl-closure-template
+       url = https://github.com/archimag/cl-closure-template.git
index 23bba37e7924bc7ad3f15f9a3545392cba3b436a..b430f559413d1eb1bbc7bd5b7b0ab19e712e48af 100644 (file)
@@ -9,6 +9,9 @@
                         (awk-mode . "awk")
                         (other . "stroustrup")))
 
+(require 'closure-template-html-mode)
+(setq sgml-basic-offset 4)
+
 (require 'coffee-mode)
 (setq coffee-tab-width 4)
 
 (setq js2r-prefered-quote-type 2)
 (when (require 'tern nil 'noerror)
   (add-hook 'js2-mode-hook (lambda () (tern-mode t))))
+(defun tern-project-dir ()
+  (or (and (equal tern-last-file-name (buffer-file-name)) tern-project-dir)
+      (and (not (buffer-file-name)) (setf tern-project-dir ""))
+      (setf tern-project-dir (locate-dominating-file default-directory ".git")))
+  ;; Track the file name to detect if it changed, which means the project
+  ;; directory needs to be found again.
+  (setf tern-last-file-name (buffer-file-name))
+  tern-project-dir)
+
 
 (when (require 'ledger-mode nil 'noerror)
   (add-to-list 'auto-mode-alist '("\\.ledger\\'" . ledger-mode))
diff --git a/packages/cl-closure-template b/packages/cl-closure-template
new file mode 160000 (submodule)
index 0000000..f1983aa
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit f1983aa525045691e128027d2a2d74831c873d6e