comparison lisp/modes/winmgr-mode.el @ 165:5a88923fcbfe r20-3b9

Import from CVS: tag r20-3b9
author cvs
date Mon, 13 Aug 2007 09:44:42 +0200
parents 4103f0995bd7
children
comparison
equal deleted inserted replaced
164:4e0740e5aab2 165:5a88923fcbfe
64 ;; (font-lock-fontify-buffer))) 64 ;; (font-lock-fontify-buffer)))
65 ;; 65 ;;
66 66
67 67
68 ;;; Code: 68 ;;; Code:
69 (defvar winmgr-mode-hook nil
70 "Hook to be run when `winmgr-mode' is entered.")
71 69
72 (defvar winmgr-basic-offset 4 70 (defgroup winmgr nil
73 "*Number of spaces per indentation level.") 71 "Generic window manager mode."
72 :tag "Window Managers"
73 :group 'languages)
74
75
76 (defcustom winmgr-basic-offset 4
77 "*Number of spaces per indentation level."
78 :type 'integer
79 :group 'winmgr)
80
81 (defcustom winmgr-mode-hook nil
82 "Hook to be run when `winmgr-mode' is entered."
83 :type 'hook
84 :group 'winmgr)
74 85
75 86
76 ;; font-lock-isms 87 (defface font-lock-m4-face
77 (defvar font-lock-m4-face 'default 88 '((((class color))
78 "New face for m4 macros.") 89 (:foreground "blue"))
79 90 (t
80 (defun winmgr-init-font-lock () 91 (:underline t)))
81 ;; initialize font-lock faces for winmgr-mode 92 "Font-lock face for M4 macros."
82 (condition-case nil 93 :group 'winmgr)
83 (progn
84 (copy-face 'default 'm4-face)
85 (set-face-foreground 'm4-face "blue")
86 (set-face-background 'm4-face "white")
87 (setq font-lock-m4-face 'm4-face))
88 (error nil)))
89 94
90 (defvar winmgr-font-lock-keywords 95 (defvar winmgr-font-lock-keywords
91 '(("^[A-Za-z]+[ \n\t]" . font-lock-function-name-face) 96 '(("^[A-Za-z]+[ \n\t]" . font-lock-function-name-face)
92 ;;("^#.*" . font-lock-comment-face) 97 ;;("^#.*" . font-lock-comment-face)
93 ("^[A-Za-z]+(.*)" . font-lock-m4-face)) 98 ("^[A-Za-z]+(.*)" . font-lock-m4-face))
94 "Default font-lock keywords.") 99 "Default font-lock keywords.")
95
96 100
97 101
98 ;; major-mode stuff 102 ;; major-mode stuff
99 (defvar winmgr-mode-abbrev-table nil 103 (defvar winmgr-mode-abbrev-table nil
100 "Abbrev table used in `winmgr-mode' buffers.") 104 "Abbrev table used in `winmgr-mode' buffers.")
117 (setq winmgr-mode-map (make-sparse-keymap)) 121 (setq winmgr-mode-map (make-sparse-keymap))
118 ;; So far there aren't any winmgr-mode specific functions 122 ;; So far there aren't any winmgr-mode specific functions
119 ) 123 )
120 124
121 125
126 ;;;###autoload
122 (defun winmgr-mode () 127 (defun winmgr-mode ()
123 "Major mode for editing winmgr config files." 128 "Major mode for editing winmgr config files."
124 (interactive) 129 (interactive)
125 (kill-all-local-variables) 130 (kill-all-local-variables)
126 (set-syntax-table winmgr-mode-syntax-table) 131 (set-syntax-table winmgr-mode-syntax-table)