[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with mumamo in org-mode
From: |
Nordlöw |
Subject: |
Problems with mumamo in org-mode |
Date: |
Sat, 31 Oct 2009 13:05:48 -0700 (PDT) |
User-agent: |
G2/1.0 |
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)))
- Problems with mumamo in org-mode,
Nordlöw <=