diff options
author | Tom Willemsen | 2011-03-07 09:04:49 +0100 |
---|---|---|
committer | Tom Willemsen | 2011-03-07 09:04:49 +0100 |
commit | 94d2fc1815a919734353c942f224db1de4b4fcb8 (patch) | |
tree | 4168e816ead132bfa3510e272427837c3895f5e2 /emacs.d/nxhtml/tests/in/bug416505-nxhtml.el | |
parent | d0e7674fdb1de12c8de202d4028a5d7ed3669a6e (diff) | |
download | dotfiles-94d2fc1815a919734353c942f224db1de4b4fcb8.tar.gz dotfiles-94d2fc1815a919734353c942f224db1de4b4fcb8.zip |
Django, org
* Added nxhtml, mostly for django support.
* Changed some org settings.
Diffstat (limited to 'emacs.d/nxhtml/tests/in/bug416505-nxhtml.el')
-rw-r--r-- | emacs.d/nxhtml/tests/in/bug416505-nxhtml.el | 45 |
1 files changed, 45 insertions, 0 deletions
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 "<mx:Script>" (0+ space) "<![CDATA[")) + +(defconst mumamo-actionscript-tag-end-regex + (rx "]]>" (0+ space) "</mx:Script>")) + +;; (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)) |