all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problems with mumamo in org-mode
@ 2009-10-31 20:05 Nordlöw
  2009-10-31 22:16 ` Lennart Borgman
  0 siblings, 1 reply; 3+ messages in thread
From: Nordlöw @ 2009-10-31 20:05 UTC (permalink / raw)
  To: help-gnu-emacs

I would like to syntax highlight source code snippets in org-mode.el

I have used mumamo for this purpose with org-mode.el but I have found
it really buggy. Is mmm-mode more stable/mature?

Thanks in advance,
Nordlöw

code follows:


(defvar mumamo-org-modes
  '(ruby-mode emacs-lisp-mode c-mode)
  "Modes to include in org-files")

(defvar mumamo-org-chunk-functions
  nil
  "The automatically defined mumamo-chunk-org-* functions for use
cramming other modes into org-mode.  See `mumamo-org-modes'
`mumamo-quick-static-chunk'.")

(setq mumamo-org-chunk-functions
      (mapcar                               ;for
       (lambda (mode)                       ;each mode given
         (let* ((m-str (symbol-name mode))
                (m-name (substring m-str 0 (- (length m-str) 5))))
           (eval `(defun ,(intern (format "mumamo-chunk-org-%S" mode))
(pos min max) ;define org mode mumamo
                    ,(format "%s support inside org BEGIN END blocks"
mode)
                    (mumamo-quick-static-chunk
                     pos min max
                     (format "#+BEGIN_SRC %s" ,m-name)
                     (format "#+END_SRC %s" ,m-name)
                     t (quote ,mode) nil)))))
       mumamo-org-modes))

(eval `(define-mumamo-multi-major-mode org-mumamo
         ,(format "Turn on multiple major modes with main major mode
org-mode.\n\n%s"
                  (mapconcat (lambda (el) (format "- %S" el))
                             mumamo-org-modes "\n"))
         ("Org Source Blocks Family" org-mode ,mumamo-org-chunk-
functions)))


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-06 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-31 20:05 Problems with mumamo in org-mode Nordlöw
2009-10-31 22:16 ` Lennart Borgman
2009-11-06 13:07   ` Lennart Borgman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.