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