author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Tue, 08 Nov 2011 11:47:48 +0200 | |
changeset 795 | 627ed33d9488 |
parent 690 | 90d155b82954 |
child 844 | 5ddabbad047d |
permissions | -rw-r--r-- |
690
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
;;; dict-mode.el --- major mode for dict dictionary source files |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
;; Copyright (C) 2011 by Oleksandr Gavenko <gavenkoa@gmail.com> |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
;; You can do anything with this file without any warranty. |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
7 |
;; Author: Oleksandr Gavenko <gavenkoa@gmail.com> |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
;; Maintainer: Oleksandr Gavenko <gavenkoa@gmail.com> |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
;; Created: 2011-09-04 |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
;; Version: 0.1 |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
;; Keywords: dict, dictionary |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
;;; Commentary: |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
;; |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
;; Very pure release. |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
16 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
17 |
;;; Code: |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
18 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
19 |
(setq dict-c5-mode-map (make-sparse-keymap)) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
20 |
;; (define-key dict-c5-mode-map (kbd "RET") 'my-xxx) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
21 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
22 |
(require 'generic-x) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
23 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
24 |
;;;###autoload |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
25 |
(define-generic-mode |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
26 |
'dict-c5-mode |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
27 |
nil |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
28 |
nil |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
29 |
'( |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
30 |
("^\\(_____+\\) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
31 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
32 |
\\([^[:blank:]][^ |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
33 |
]*\\)$" (1 font-lock-function-name-face) (2 font-lock-keyword-face)) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
34 |
("^[[:blank:]]*\\(\\[[^]]*]\\)[[:space:]]" (1 font-lock-type-face)) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
35 |
) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
36 |
'("\\.dict-c5$") |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
37 |
nil |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
38 |
(list |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
39 |
(lambda nil |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
40 |
(use-local-map dict-c5-mode-map) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
41 |
(modify-syntax-entry ?' ".") |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
42 |
(modify-syntax-entry ?\" ".") |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
43 |
)) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
44 |
) |
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
45 |
|
90d155b82954
major mode for dict dictionary source files
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
46 |
;;; dict-mode.el ends here |