From 94d2fc1815a919734353c942f224db1de4b4fcb8 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 7 Mar 2011 09:04:49 +0100 Subject: Django, org * Added nxhtml, mostly for django support. * Changed some org settings. --- emacs.d/nxhtml/tests/in/bug416505-nxhtml.el | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 emacs.d/nxhtml/tests/in/bug416505-nxhtml.el (limited to 'emacs.d/nxhtml/tests/in/bug416505-nxhtml.el') diff --git a/emacs.d/nxhtml/tests/in/bug416505-nxhtml.el b/emacs.d/nxhtml/tests/in/bug416505-nxhtml.el new file mode 100644 index 0000000..867bf53 --- /dev/null +++ b/emacs.d/nxhtml/tests/in/bug416505-nxhtml.el @@ -0,0 +1,45 @@ +;; NXHTML +;;(load (concat vendor-path "/nxhtml/autostart.el")) + +(defconst mumamo-actionscript-tag-start-regex + (rx "" (0+ space) "" (0+ space) "")) + +;; (defun mumamo-search-bw-exc-start-inlined-actionscript (pos min) +;; (let ((exc-start (mumamo-chunk-start-bw-re pos min mumamo-actionscript-tag-start-regex))) +;; (and exc-start +;; (<= exc-start pos) +;; (cons exc-start 'espresso-mode)))) + +;; (defun mumamo-search-bw-exc-end-inlined-actionscript (pos min) +;; (mumamo-chunk-end-bw-re pos min mumamo-actionscript-tag-end-regex)) + +;; (defun mumamo-search-fw-exc-start-inlined-actionscript-old (pos max) +;; (mumamo-chunk-start-fw-re pos max mumamo-actionscript-tag-start-regex)) + +(defun mumamo-search-fw-exc-start-inlined-actionscript (pos max) + (let ((where (mumamo-chunk-start-fw-re pos max mumamo-actionscript-tag-start-regex))) + (when where + (list where 'js-mode)))) + +(defun mumamo-search-fw-exc-end-inlined-actionscript (pos max) + (mumamo-chunk-end-fw-re pos max mumamo-actionscript-tag-end-regex)) + +(defun mumamo-chunk-inlined-actionscript (pos min max) + ;; (mumamo-find-possible-chunk pos min max + ;; 'mumamo-search-bw-exc-start-inlined-actionscript + ;; 'mumamo-search-bw-exc-end-inlined-actionscript + ;; 'mumamo-search-fw-exc-start-inlined-actionscript-old + ;; 'mumamo-search-fw-exc-end-inlined-actionscript) + (mumamo-possible-chunk-forward pos max + 'mumamo-search-fw-exc-start-inlined-actionscript + 'mumamo-search-fw-exc-end-inlined-actionscript)) + +(define-mumamo-multi-major-mode mxml-actionscript-mumamo-mode + "Turn on multiple major modes for MXML with main mode `nxml-mode'. +This covers inlined style and script for mxml." + ("nXml Family" nxml-mode (mumamo-chunk-inlined-actionscript))) + +(add-to-list 'auto-mode-alist '("\\.mxml$" . mxml-actionscript-mumamo-mode)) -- cgit v1.2.3-54-g00ecf