Orgmode also has an amazing extension babel, which allows Literate Programming (or just inserting code snippets).
Using the #+BEGIN_SRC <mode-name> tag will also allow you to edit any code snippet in its own major mode.
Using the #+BEGIN_SRC <mode-name> tag will also allow you to edit any code snippet in its own major mode.
#+begin_src lisp
(defun botsbuildbots () (botsbuildbots))
#+end_src
Try moving your point to (defun... and pressing << C-c ' >>. It should work with org-mode bundled in Emacs 23; if not, you can get the newest version from http://orgmode.org.With org-babel enabled, you can actually run this code, or use it in literate-programming style to write programs.
This is really nice for writing code example.