initial commit
[emacs-init.git] / nxhtml / related / iss-mumamo.el
1 ;;; iss-mumamo.el --- Defines multi major mode for Inno Setup files
2 ;;
3 ;; Author: Lennart Borgman (lennart O borgman A gmail O com)
4 ;; Created: 2008-08-09
5 ;; Version: 0.3
6 ;; Last-Updated: 2009-12-12 Sat
7 ;; URL:
8 ;; Keywords:
9 ;; Compatibility:
10 ;;
11 ;; Features that might be required by this library:
12 ;;
13   ;; `comint', `compile', `iss-mode', `ring', `tool-bar'.
14 ;;
15 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 ;;
17 ;;; Commentary:
18 ;;
19 ;;
20 ;;
21 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22 ;;
23 ;;; Change log:
24 ;;
25 ;;
26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27 ;;
28 ;; This program is free software; you can redistribute it and/or
29 ;; modify it under the terms of the GNU General Public License as
30 ;; published by the Free Software Foundation; either version 2, or
31 ;; (at your option) any later version.
32 ;;
33 ;; This program is distributed in the hope that it will be useful,
34 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
35 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
36 ;; General Public License for more details.
37 ;;
38 ;; You should have received a copy of the GNU General Public License
39 ;; along with this program; see the file COPYING.  If not, write to
40 ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
41 ;; Floor, Boston, MA 02110-1301, USA.
42 ;;
43 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
44 ;;
45 ;;; Code:
46
47 (require 'iss-mode)
48 (require 'mumamo)
49
50 (defun mumamo-chunk-iss-code (pos min max)
51   "Find [code]..., return range and `pascal-mode'.
52 See `mumamo-find-possible-chunk' for POS, MIN and MAX.
53
54 Note that if this section is not the last"
55   (mumamo-quick-static-chunk pos min max "[code]" "{*** End of CODE **}" t 'pascal-mode t))
56
57 ;;;###autoload
58 (define-mumamo-multi-major-mode iss-mumamo-mode
59   "Turn on multiple major modes Inno Setup .iss files.
60 The main major mode will be `iss-mode'.
61 The [code] section, if any, will be in `pascal-mode'."
62     ("Inno ISS Family" iss-mode
63      (mumamo-chunk-iss-code
64       )))
65
66 (add-to-list 'auto-mode-alist '("\\.iss\\'" . iss-mumamo-mode))
67
68 (provide 'iss-mumamo)
69 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
70 ;;; iss-mumamo.el ends here