[ic] [interchange] Add emacs major mode for ITL

Stefan Hornburg (Racke) racke at linuxia.de
Mon Jul 15 07:22:35 UTC 2013

On 07/15/2013 08:31 AM, Peter wrote:
> On 07/15/2013 06:24 PM, Jon Jensen wrote:
>> commit 349a71055d7ec54193d161d997f0db83c0423811
>> Author: Jon Jensen <jon at endpoint.com>
>> Date:   Mon Jul 15 07:23:00 2013 +0100
>>      Add emacs major mode for ITL
> Oh very cool, I will definately be giving this a try.  Do you think it's possible to give it the ability to recognize perl and calc[n] blocks and switch to perl mode inside of those?

You can do this with MMM, configuration example:

(require 'mmm-mode)
(setq mmm-global-mode 'maybe)

	:submode cperl-mode
	:face mmm-code-submode-face
	:front "\\\[perl.*?\\\]"
	:back "\\\[/perl\\\]")

	:submode cperl-mode
	:face mmm-code-submode-face
	:front "\\\[\\(calcn?\\)\\\]"
	:back "\\\[/~1\\\]"
	:save-matches 1)
	:submode cperl-mode
	:face mmm-code-submode-face
	:front "<<\\([a-zA-Z0-9_-]+\\)"
    :back "^~1$"
	:save-matches 1)

;; embedded CSS
(add-to-list 'mmm-mode-ext-classes-alist '(hm--html-mode nil embedded-css))
;; embedded JavaScript
(add-to-list 'mmm-mode-ext-classes-alist '(hm--html-mode nil html-js))
;; embedded Perl within IC
(add-to-list 'mmm-mode-ext-classes-alist '(hm--html-mode nil interchange))
(add-to-list 'mmm-mode-ext-classes-alist '(fundamental-mode nil interchange))


LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

More information about the interchange-users mailing list