contrib/gadict.el
changeset 373 51565d9fe630
parent 372 e14e384267ee
child 374 aeaa3f721014
equal deleted inserted replaced
372:e14e384267ee 373:51565d9fe630
    16 ;;   (add-to-list 'auto-mode-alist (cons "\\.gadict$" 'gadict-mode))
    16 ;;   (add-to-list 'auto-mode-alist (cons "\\.gadict$" 'gadict-mode))
    17 
    17 
    18 ;;; Code:
    18 ;;; Code:
    19 
    19 
    20 (defvar gadict-font-lock-keywords
    20 (defvar gadict-font-lock-keywords
    21   '( ("^\\(_\\{2\\}\\)\n\n\\(\\w.*\\)$"
    21   '( ("^\\(_\\{2\\}\\)\n\n\\(\\w.*\\)$" (1 font-lock-function-name-face) (2 font-lock-keyword-face))
    22       (1 font-lock-function-name-face) (2 font-lock-keyword-face))
    22      ("^#.*" . font-lock-comment-face)
    23      ("^ +\\[[^]\n]+]" . font-lock-type-face)
    23      ("^ +\\[[^]\n]+]" . font-lock-type-face)
    24      ("^\\(?:en\\|ru\\|uk\\|la\\): " . font-lock-type-face)
    24      ("^\\(?:en\\|ru\\|uk\\|la\\): " . font-lock-type-face)
    25      ("^\\(?:en\\|ru\\|uk\\|la\\)> " . font-lock-doc-face)
    25      ("^\\(?:en\\|ru\\|uk\\|la\\)> " . font-lock-doc-face)
    26      ("^\\(?:topic\\|ant\\|syn\\): " . font-lock-doc-face)
    26      ("^\\(?:topic\\|ant\\|syn\\): " . font-lock-doc-face)
    27      ("^ +\\(?:v1\\|v2\\|v3\\|s\\|pl\\|male\\|female\\)$" . font-lock-doc-face)
    27      ("^ +\\(?:v1\\|v2\\|v3\\|s\\|pl\\|male\\|female\\)$" . font-lock-doc-face)
    38   (set (make-local-variable 'comment-start)  "#")
    38   (set (make-local-variable 'comment-start)  "#")
    39   (set (make-local-variable 'comment-continue)  nil)
    39   (set (make-local-variable 'comment-continue)  nil)
    40   (set (make-local-variable 'comment-end)  "")
    40   (set (make-local-variable 'comment-end)  "")
    41   (set (make-local-variable 'comment-end-skip)  nil)
    41   (set (make-local-variable 'comment-end-skip)  nil)
    42   (set (make-local-variable 'comment-multi-line)  nil)
    42   (set (make-local-variable 'comment-multi-line)  nil)
    43   (set (make-local-variable 'comment-use-syntax)  t) )
    43   (set (make-local-variable 'comment-use-syntax)  nil) )
    44 
    44 
    45 (defun gadict-setup-paragraph ()
    45 (defun gadict-setup-paragraph ()
    46   (set (make-local-variable 'paragraph-separate)  "__$")
    46   (set (make-local-variable 'paragraph-separate)  "__$")
    47   (set (make-local-variable 'paragraph-start)  "__$") )
    47   (set (make-local-variable 'paragraph-start)  "__$") )
    48 
    48