Hi.

I'm about to add this file.

W. Borgert <[EMAIL PROTECTED]> wrote:

> On Sun, Oct 31, 2004 at 12:56:28PM +0000, W. Borgert wrote:
> > (setq preseed-font-lock-keywords
> >       (eval-when-compile
> >     (list
> >      (list "\\(^\\s-+#.*\\)" '(1 font-lock-comment-face))
>                       ^ this should be a '*', not a '+', sorry
> 

So this is what you want?

--------
;;; preseed.el --- a major mode for editing d-i preseed files

;; Copyright (C) 2004 `W. Borgert <[EMAIL PROTECTED]>

;; This package is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; This package is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;;; Code:
(require 'font-lock)

(defvar preseed-mode-abbrev-table nil
  "Abbreviation table used in d-i preseed buffers.")
(define-abbrev-table 'preseed-mode-abbrev-table ())

(defvar preseed-font-lock-keywords
  '(("^\\([a-z-]+\\)[ \t]+\\([^ ]+\\)[ \t]+\\([^ ]+\\)"
     (1 font-lock-keyword-face)
     (2 font-lock-function-name-face)
     (3 font-lock-type-face))
    ("\\(^\\s-*#.*\\)"
     (1 font-lock-comment-face)))
  "Keyword patterns for preseed-mode fontification.")

(defun preseed-mode ()
  "Major mode for editing d-i preseed files colourfully."
  (interactive)
  (kill-all-local-variables)
  (setq comment-start "#"
        comment-multi-line nil
        comment-start-skip "#+[\t ]*")
  (setq major-mode 'preseed-mode
        mode-name "Preseed"
        local-abbrev-table preseed-mode-abbrev-table)
  (run-hooks 'preseed-mode-hook)
  (set (make-local-variable 'font-lock-defaults)
       '(preseed-font-lock-keywords nil nil ((?_ . "w")))))

(provide 'preseed)

;;; preseed.el ends here
--------


-- 
Peter S. Galbraith, Debian Developer          <[EMAIL PROTECTED]>
                                 http://people.debian.org/~psg
GPG key 1024/D2A913A1 - 97CE 866F F579 96EE  6E68 8170 35FF 799E


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to