dict-mode.el
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 14 Sep 2011 15:16:12 +0300
changeset 697 d19881accc91
parent 690 90d155b82954
child 844 5ddabbad047d
permissions -rw-r--r--
Make behaviour same as in GUI for dired.

;;; dict-mode.el --- major mode for dict dictionary source files

;; Copyright (C) 2011 by Oleksandr Gavenko <gavenkoa@gmail.com>

;; You can do anything with this file without any warranty.

;; Author: Oleksandr Gavenko <gavenkoa@gmail.com>
;; Maintainer: Oleksandr Gavenko <gavenkoa@gmail.com>
;; Created: 2011-09-04
;; Version: 0.1
;; Keywords: dict, dictionary

;;; Commentary:
;;
;; Very pure release.

;;; Code:

(setq dict-c5-mode-map (make-sparse-keymap))
;; (define-key dict-c5-mode-map (kbd "RET") 'my-xxx)

(require 'generic-x)

;;;###autoload
(define-generic-mode
  'dict-c5-mode
  nil
  nil
  '(
    ("^\\(_____+\\)

\\([^[:blank:]][^
]*\\)$" (1 font-lock-function-name-face) (2 font-lock-keyword-face))
    ("^[[:blank:]]*\\(\\[[^]]*]\\)[[:space:]]" (1 font-lock-type-face))
    )
  '("\\.dict-c5$")
  nil
  (list
   (lambda nil
     (use-local-map dict-c5-mode-map)
     (modify-syntax-entry ?' ".")
     (modify-syntax-entry ?\" ".")
     ))
  )

;;; dict-mode.el ends here