web commit by bremner
authorJoey Hess <joey@kitenet.net>
Mon, 3 Mar 2008 12:13:13 +0000 (07:13 -0500)
committerJoey Hess <joey@kitenet.net>
Mon, 3 Mar 2008 12:13:13 +0000 (07:13 -0500)
doc/tips/Emacs_and_markdown.html [new file with mode: 0644]

diff --git a/doc/tips/Emacs_and_markdown.html b/doc/tips/Emacs_and_markdown.html
new file mode 100644 (file)
index 0000000..fcff8f0
--- /dev/null
@@ -0,0 +1,16 @@
+I added the following to my <code>.emacs</code>.
+
+The hook is to convert tabs to spaces to avoid unpleasant 
+surprises with code blocks. For source to ska-untabify see the
+<a href="http://www.emacswiki.org/cgi-bin/wiki/UntabifyUponSave">EmacsWiki</a>
+<pre>
+(autoload 'markdown-mode "markdown-mode")
+(add-to-list 'auto-mode-alist '("\\.mdwn" . markdown-mode))
+
+(add-hook 'markdown-mode-hook  
+           '(lambda () 
+               (make-local-hook 'write-contents-hooks) 
+                (add-hook 'write-contents-hooks 'ska-untabify nil t)))
+</pre>
+
+;; [[DavidBremner]]