summaryrefslogtreecommitdiff
path: root/doc/tips/Emacs_and_markdown.html
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2008-03-03 07:13:13 -0500
committerJoey Hess <joey@kitenet.net>2008-03-03 07:13:13 -0500
commit150acf68ec741a701bd287d7090f62e58a0bd6bd (patch)
tree24db4a7c039c83996f0fbb25fa194dcc5f05b4d0 /doc/tips/Emacs_and_markdown.html
parent119f2e426d5791d42cf24896b05ccd0155a78782 (diff)
web commit by bremner
Diffstat (limited to 'doc/tips/Emacs_and_markdown.html')
-rw-r--r--doc/tips/Emacs_and_markdown.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/tips/Emacs_and_markdown.html b/doc/tips/Emacs_and_markdown.html
new file mode 100644
index 000000000..fcff8f0a5
--- /dev/null
+++ b/doc/tips/Emacs_and_markdown.html
@@ -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]]