 ;; Sammartino, ppercot, Valentin Funk, Stig Bakken, Gregory Stark,
 ;; Chris Morris, Nils Rennebarth, Gerrit Riessen, Eric Mc Sween,
 ;; Ville Skytta, Giacomo Tesio, Lennart Borgman, Stefan Monnier,
-;; Aaron S. Hawley, Ian Eure, Bill Lovett
+;; Aaron S. Hawley, Ian Eure, Bill Lovett, Dias Badekas, David House
 
 ;;; Changelog:
 
+;; 1.5
+;;   Support function keywords like public, private and the ampersand
+;;   character for function-based commands.  Support abstract, final,
+;;   static, public, private and protected keywords in Imenu.  Fix
+;;   reversed order of Imenu entries.  Use font-lock-preprocessor-face
+;;   for PHP and ASP tags.  Make php-mode-modified a literal value
+;;   rather than a computed string.  Add date and time constants of
+;;   PHP. (Dias Badekas) Fix false syntax highlighting of keywords
+;;   because of underscore character.  Change HTML indentation warning
+;;   to match only HTML at the beginning of the line.  Fix
+;;   byte-compiler warnings.  Clean-up whitespace and audited style
+;;   consistency of code.  Remove conditional bindings and XEmacs code
+;;   that likely does nothing.
+;;
 ;; 1.4
 ;;   Updated GNU GPL to version 3.  Ported to Emacs 22 (CC mode
 ;;   5.31). M-x php-mode-version shows version.  Provide end-of-defun

(defconst php-types
  (eval-when-compile
    (regexp-opt '("array" "bool" "boolean" "char" "const" "double" "float"
		  "int" "integer" "long" "mixed" "object" "real"
		  "string")))
  "PHP types.")

(defconst php-superglobals
  (eval-when-compile
    (regexp-opt '("_GET" "_POST" "_COOKIE" "_SESSION" "_ENV" "GLOBALS"
		  "_SERVER" "_FILES" "_REQUEST")))
  "PHP superglobal variables.")

;; Set up font locking
(defconst php-font-lock-keywords-1
  (list
   ;; Fontify constants
   (cons
    (concat "\\<\\(" php-constants "\\)\\>")
    'font-lock-constant-face)

   ;; Fontify keywords
   (cons
    (concat "\\<\\(" php-keywords "\\)\\>")
    'font-lock-keyword-face)

   ;; Fontify keywords and targets, and case default tags.
   (list "\\<\\(break\\|case\\|continue\\)\\>[ \t]*\\(-?\\(?:\\sw\\|\\s_\\)+\\)?"
	 '(1 font-lock-keyword-face) '(2 font-lock-constant-face t t))
   ;; This must come after the one for keywords and targets.
   '(":" ("^[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)[ \t]*:[ \t]*$"
	  (beginning-of-line) (end-of-line)
	  (1 font-lock-constant-face)))

   ;; treat 'print' as keyword only when not used like a function name
   '("\\<print\\s-*(" . php-default-face)
   '("\\<print\\>" . font-lock-keyword-face)

   ;; Fontify PHP tag
   '("<\\?\\(php\\)?" . font-lock-constant-face)
   '("\\?>" . font-lock-constant-face)

   ;; Fontify ASP-style tag
   '("<\\%\\(=\\)?" . font-lock-constant-face)
   '("\\%>" . font-lock-constant-face)

   )
  "Subdued level highlighting for PHP mode.")

  (set (make-local-variable 'open-paren-in-column-0-is-defun-start)
       nil)
  (set (make-local-variable 'defun-prompt-regexp)
       "^\\s-*function\\s-+&?\\s-*\\(\\(\\sw\\|\\s_\\)+\\)\\s-*")
  (set (make-local-variable 'add-log-current-defun-header-regexp)
       php-beginning-of-defun-regexp)

