Just Another Geek!/ blog/ posts/ Emacs sait tout faire ? Tant mieux !
;; A mettre dans votre ~/.emacs

(defun nb-insert-markup (string)
  "Insert une balise."

  (if (not mark-active)
      ;; no region selected
      (progn
        (if (eolp)
            ;; End of line or buffer so we are breaking the line
            (progn (insert (concat "\n<" string ">\n"))
                   (save-excursion
                     (insert (concat "\n