;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
;;; Written by Steve Byrne.
;;; 
;;; This file is part of GNU Smalltalk.
;;;  
;;; GNU Smalltalk 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 1, or (at your option) any later 
;;; version.
;;;
;;; GNU Smalltalk 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.
;;;
;;; You should have received a copy of the GNU General Public License along
;;; with GNU Smalltalk; see the file COPYING.  If not, write to the Free
;;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'hilit19)

(hilit-set-mode-patterns
 'smalltalk-mode
 '(("\".*\"" nil comment)
;   ("\"" "[^\\]\"" string)
   (hilit-string-find ?' string)
   ("\'.*\'" nil string)
   ;; declaration	
   ("^!.*[^ ].*!" nil define)
   ("^#.*$" nil include)
   ;; function decls are expected to have types on the previous line
   ("^[A-Za-z][A-Za-z0-9]*[ \n\t]" nil defun)
   ("^\\([A-Za-z][A-Za-z0-9]*:[ \t\n]+[A-Za-z][A-Za-z0-9]*[ \t\n]+\\)+" nil defun)
   ("^\\(\\(\\w\\|[$_]\\)+[ \t]*::[ \t]*\\)?\\(\\(\\w\\|[$_]\\)+\\|operator.*\\)\\s *\\(\\(\\w\\|[$_]\\)+\\s *((\\|(\\)[^)]*)+" nil defun)
   ("^\\(template\\|typedef\\|struct\\|union\\|class\\|enum\\|public\\|private\\|protected\\).*$" nil decl)
   ;; key words
   ("[A-Za-z0-9]*:" nil struct) ;; wrong name
;   ("\\W[A-Za-z0-9]*:\\W"
;    1 keyword)
))


