summaryrefslogtreecommitdiff
path: root/doc/tips/Emacs_and_markdown.html
blob: fcff8f0a5a5f981de7db608ade394aa61ee3302e (plain)
  1. I added the following to my <code>.emacs</code>.
  2. The hook is to convert tabs to spaces to avoid unpleasant
  3. surprises with code blocks. For source to ska-untabify see the
  4. <a href="http://www.emacswiki.org/cgi-bin/wiki/UntabifyUponSave">EmacsWiki</a>
  5. <pre>
  6. (autoload 'markdown-mode "markdown-mode")
  7. (add-to-list 'auto-mode-alist '("\\.mdwn" . markdown-mode))
  8. (add-hook 'markdown-mode-hook
  9. '(lambda ()
  10. (make-local-hook 'write-contents-hooks)
  11. (add-hook 'write-contents-hooks 'ska-untabify nil t)))
  12. </pre>
  13. ;; [[DavidBremner]]