author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Thu, 20 Dec 2012 23:42:25 +0200 | |
changeset 1013 | e88896e74332 |
parent 318 | 6a430707c23e |
permissions | -rw-r--r-- |
257
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
1 |
;;; iar-linker-config-mode.el --- major mode for highlighting IAR Embedded Workbench 4.x linker scripts |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
2 |
|
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
3 |
;; Copyright (C) 2009, 2010 by Oleksandr Gavenko <gavenkoa@gmail.com> |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
4 |
|
279
fd6164dfec82
Update copyright statement and year.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
274
diff
changeset
|
5 |
;; You can do anything with this file without any warranty. |
fd6164dfec82
Update copyright statement and year.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
274
diff
changeset
|
6 |
|
257
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
7 |
;; Author: Oleksandr Gavenko <gavenkoa@gmail.com> |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
8 |
;; Maintainer: Oleksandr Gavenko <gavenkoa@gmail.com> |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
9 |
;; Created: 2009-11-04 |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
10 |
;; Version: 0.1 |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
11 |
;; Keywords: languages |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
12 |
|
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
13 |
;;; Commentary: |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
14 |
;; |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
15 |
;; Very pure highlighting and not all available syntax. |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
16 |
|
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
17 |
;;; Code: |
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
18 |
|
274
7c18567f0754
Added autoload magic comment for main mode function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
270
diff
changeset
|
19 |
;;;###autoload |
210
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
20 |
(define-generic-mode iar4-linker-config-mode |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
21 |
'("// " ("/*" . "*/")) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
22 |
nil |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
23 |
'( |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
24 |
("^\\(-c\\)\\([_a-zA-Z]+\\)" |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
25 |
(1 font-lock-keyword-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
26 |
(2 font-lock-variable-name-face) ) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
27 |
("^\\(-D\\)\\([_a-zA-Z0-9]+\\)=\\(\\(0x\\)?[0-9a-fA-F]+\\|.[0-9]+\\)" |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
28 |
(1 font-lock-keyword-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
29 |
(2 font-lock-variable-name-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
30 |
(3 font-lock-constant-face) ) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
31 |
("^\\(-Q\\)\\([_a-zA-Z]+\\)=\\([_a-zA-Z]+\\)" |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
32 |
(1 font-lock-keyword-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
33 |
(2 font-lock-variable-name-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
34 |
(3 font-lock-variable-name-face) ) |
236
848b9cd2e47c
Correct highlight patterns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
210
diff
changeset
|
35 |
("^\\(-Z\\|-P\\|-b\\)(\\([_a-zA-Z]+\\))\\([_a-zA-Z]+\\)=" |
210
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
36 |
(1 font-lock-keyword-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
37 |
(2 font-lock-variable-name-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
38 |
(3 font-lock-variable-name-face) ) |
236
848b9cd2e47c
Correct highlight patterns.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
210
diff
changeset
|
39 |
("^\\(-Z\\|-P\\|-b\\)(\\([_a-zA-Z]+\\))\\([_a-zA-Z]+\\)\\+\\([_a-zA-Z]+\\)=" |
210
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
40 |
(1 font-lock-keyword-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
41 |
(2 font-lock-variable-name-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
42 |
(3 font-lock-variable-name-face) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
43 |
(4 font-lock-variable-name-face) ) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
44 |
) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
45 |
(list "\\.\\(xcl\\)\\'") |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
46 |
(list |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
47 |
(lambda () (setq comment-start "// " comment-end "")) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
48 |
) |
b1404f54ec30
Added iar4-linker-config-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
49 |
"Generic mode for iar linker config files.") |
258
29533873ee3e
Fix docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
257
diff
changeset
|
50 |
|
29533873ee3e
Fix docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
257
diff
changeset
|
51 |
(provide 'iar4-linker-config-mode) |
29533873ee3e
Fix docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
257
diff
changeset
|
52 |
|
257
2f3ac763c340
Make docs headers according to 'Conventional Headers for Emacs Libraries'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
236
diff
changeset
|
53 |
;;; iar4-linker-config-mode.el ends here |