Changes to add PHP, JavaScript, and C# support to CC mode.  They are
against the Emacs 23.1 source.  This work is preliminary and probably
needs attention from people interested in support for those languages;
I originally did the work a few years ago, but don't currently have
much use for it, and the Emacs maintainers apparently aren't
interested in support for these languages unfortunately.

Note that this only deals with raw PHP code, not embedded in HTML, so
it may not make sense to associate .php files with php-mode.
multi-mode.el can cope with such embedding (see my html-php.el) but
not currently with nxml-mode, though I'll probably fix that.

Dave Love <fx@gnu.org>  2009-10

2009-09-14  Dave Love  <fx@gnu.org>

	* Merge with Emacs 23 source.

	* progmodes/cc-defs.el (c-save-buffer-state): Fix
	inhibit-modification-hooks setting.

2006-05-15  Dave Love  <fx@gnu.org>

	* progmodes/cc-langs.el (c-symbol-start, c-symbol-chars)
	(c-operators, c-primitive-type-kwds, c-type-prefix-kwds)
	(c-type-modifier-kwds, c-class-decl-kwds)
	(c-other-block-decl-kwds, c-modifier-kwds, c-block-stmt-1-kwds)
	(c-block-stmt-2-kwds, c-simple-stmt-kwds, c-constant-kwds)
	(c-primary-expr-kwds): csharp additions.

	* progmodes/cc-defs.el (csharp-mode): Put c-mode-prefix.

	* progmodes/cc-fonts.el (csharp-font-lock-keywords-1) 
	(csharp-font-lock-keywords-2, csharp-font-lock-keywords-3) 
	(csharp-font-lock-keywords, csharp-font-lock-keywords-2) 
	(csharp-font-lock-keywords-3, csharp-font-lock-keywords): New.

	* progmodes/cc-mode.el (c-init-language-vars-for): Add csharp.
	(js-mode-abbrev-table): Populate.
	(csharp-mode-syntax-table, csharp-mode-abbrev-table) 
	(csharp-mode-map, c-csharp-menu, csharp-mode-syntactic-keywords) 
	(csharp-mode): New.

2006-05-09  Dave Love  <fx@gnu.org>

	* progmodes/cc-langs.el (c-recognize-colon-labels) 
	(c-label-prefix-re): Mod for JavaScript.
	(c-simple-stmt-kwds): Fix for JavaScript.

2006-05-05  Dave Love  <fx@gnu.org>

	Preliminary support for PHP, JavaScript.

	* progmodes/cc-mode.el (c-init-language-vars-for): Mod for PHP,
	JavaScript.
	(php-mode-syntax-table, php-mode-abbrev-table, php-mode-map)
	(c-php-menu, php-mode-syntactic-keywords, php-mode)
	(js-mode-syntax-table, js-mode-abbrev-table, js-mode-map)
	(c-js-menu, js-mode-syntactic-keywords, js-mode)
	(ecmascript-mode, javascript-mode): New.

	* progmodes/cc-menus.el (cc-imenu-php-generic-expression)
	(cc-imenu-js-generic-expression): New.

	* progmodes/cc-langs.el (c-make-mode-syntax-table): Mod for PHP.
	(c-symbol-start, c-identifier-ops)
	(c-multiline-string-start-char, c-opt-cpp-prefix)
	(c-opt-cpp-start, c-operators, c-other-op-syntax-tokens)
	(c-primitive-type-kwds, c-class-decl-kwds)
	(c-brace-list-decl-kwds, c-postfix-decl-spec-kwds)
	(c-type-list-kwds, c-block-stmt-1-kwds, c-block-stmt-2-kwds)
	(c-simple-stmt-kwds, c-before-label-kwds, c-constant-kwds)
	(c-primary-expr-kwds, c-other-kwds, c-type-decl-prefix-key)
	(c-assignment-operators, c-paragraph-start): Mods for PHP and/or
	JavaScript.

	* progmodes/cc-fonts.el (php-font-lock-keywords)
	(php-font-lock-keywords-1, php-font-lock-keywords-2)
	(php-font-lock-keywords-3, js-font-lock-keywords)
	(js-font-lock-keywords-1, js-font-lock-keywords-2)
	(js-font-lock-keywords-3): New.

	* progmodes/cc-vars.el (c-doc-comment-style): Add php entry.

--- ./lisp/progmodes/cc-fonts.el.orig	2009-09-14 22:42:07.000000000 +0100
+++ ./lisp/progmodes/cc-fonts.el	2009-09-14 22:42:46.000000000 +0100
@@ -2018,7 +2018,106 @@ (defun pike-font-lock-keywords ()
   (c-compose-keywords-list pike-font-lock-keywords))
 
 
+;;; PHP.
+
+(c-override-default-keywords 'php-font-lock-keywords)
+
+(defconst php-font-lock-keywords-1 (c-lang-const c-matchers-1 php)
+  "Minimal font locking for PHP mode.
+Fontifies only preprocessor directives (in addition to the syntactic
+fontification of strings and comments).")
+
+(defconst php-font-lock-keywords-2 (c-lang-const c-matchers-2 php)
+  "Fast normal font locking for PHP mode.
+In addition to `php-font-lock-keywords-1', this adds fontification of
+keywords, simple types, declarations that are easy to recognize, the
+user defined types on `php-font-lock-extra-types', and the doc
+comment styles specified by `c-doc-comment-style'.")
+
+(defconst php-font-lock-keywords-3 (c-lang-const c-matchers-3 php)
+  "Accurate normal font locking for PHP mode.
+Like `php-font-lock-keywords-2' but detects declarations in a more
+accurate way that works in most cases for arbitrary types without the
+need for `php-font-lock-extra-types'.")
+
+(defvar php-font-lock-keywords php-font-lock-keywords-3
+  "Default expressions to highlight in PHP mode.")
+
+(defun php-font-lock-keywords-2 ()
+  (c-compose-keywords-list php-font-lock-keywords-2))
+(defun php-font-lock-keywords-3 ()
+  (c-compose-keywords-list php-font-lock-keywords-3))
+(defun php-font-lock-keywords ()
+  (c-compose-keywords-list php-font-lock-keywords))
+
+
+;;; JavaScript.
+
+(c-override-default-keywords 'js-font-lock-keywords)
+
+(defconst js-font-lock-keywords-1 (c-lang-const c-matchers-1 js)
+  "Minimal font locking for JavaScript mode.
+Fontifies only preprocessor directives (in addition to the syntactic
+fontification of strings and comments).")
+
+(defconst js-font-lock-keywords-2 (c-lang-const c-matchers-2 js)
+  "Fast normal font locking for JavaScript mode.
+In addition to `js-font-lock-keywords-1', this adds fontification of
+keywords, simple types, declarations that are easy to recognize, the
+user defined types on `js-font-lock-extra-types', and the doc
+comment styles specified by `c-doc-comment-style'.")
+
+(defconst js-font-lock-keywords-3 (c-lang-const c-matchers-3 js)
+  "Accurate normal font locking for JavaScript mode.
+Like `js-font-lock-keywords-2' but detects declarations in a more
+accurate way that works in most cases for arbitrary types without the
+need for `js-font-lock-extra-types'.")
+
+(defvar js-font-lock-keywords js-font-lock-keywords-3
+  "Default expressions to highlight in JavaScript mode.")
+
+(defun js-font-lock-keywords-2 ()
+  (c-compose-keywords-list js-font-lock-keywords-2))
+(defun js-font-lock-keywords-3 ()
+  (c-compose-keywords-list js-font-lock-keywords-3))
+(defun js-font-lock-keywords ()
+  (c-compose-keywords-list js-font-lock-keywords))
+
+
+;;; C#
+
+(c-override-default-keywords 'csharp-font-lock-keywords)
+
+(defconst csharp-font-lock-keywords-1 (c-lang-const c-matchers-1 csharp)
+  "Minimal font locking for C# mode.
+Fontifies only preprocessor directives (in addition to the syntactic
+fontification of strings and comments).")
+
+(defconst csharp-font-lock-keywords-2 (c-lang-const c-matchers-2 csharp)
+  "Fast normal font locking for C# mode.
+In addition to `csharp-font-lock-keywords-1', this adds fontification of
+keywords, simple types, declarations that are easy to recognize, the
+user defined types on `csharp-font-lock-extra-types', and the doc
+comment styles specified by `c-doc-comment-style'.")
+
+(defconst csharp-font-lock-keywords-3 (c-lang-const c-matchers-3 csharp)
+  "Accurate normal font locking for C# mode.
+Like `csharp-font-lock-keywords-2' but detects declarations in a more
+accurate way that works in most cases for arbitrary types without the
+need for `csharp-font-lock-extra-types'.")
+
+(defvar csharp-font-lock-keywords csharp-font-lock-keywords-3
+  "Default expressions to highlight in C# mode.")
+
+(defun csharp-font-lock-keywords-2 ()
+  (c-compose-keywords-list csharp-font-lock-keywords-2))
+(defun csharp-font-lock-keywords-3 ()
+  (c-compose-keywords-list csharp-font-lock-keywords-3))
+(defun csharp-font-lock-keywords ()
+  (c-compose-keywords-list csharp-font-lock-keywords))
+
+
 ;;; Doc comments.
 
 (defun c-font-lock-doc-comments (prefix limit keywords)
--- ./lisp/progmodes/cc-menus.el.orig	2009-09-14 22:42:07.000000000 +0100
+++ ./lisp/progmodes/cc-menus.el	2009-09-14 22:42:46.000000000 +0100
@@ -166,7 +166,18 @@ (defvar cc-imenu-java-generic-expression
        ) 1))
   "Imenu generic expression for Java mode.  See `imenu-generic-expression'.")
 
+(defvar cc-imenu-php-generic-expression
+ '(("Functions"
+    "^\\s-*function\\s-+&?\\([[:alnum:]_]+\\)\\s-*(" 1)
+   ("Classes"
+    "^\\s-*class\\s-+\\([[:alnum:]_]+\\)\\s-*" 1))
+ "Imenu generic expression for PHP Mode. See `imenu-generic-expression'.")
+
+;; Top-level functions only.
+(defvar cc-imenu-js-generic-expression
+  `((nil ,(concat "^function\\s-+\\([" c-alnum "_]+\\)") 1)))
+
 ;;                        *Warning for cc-mode developers*
 ;;
 ;; `cc-imenu-objc-generic-expression' elements depend on
--- ./lisp/progmodes/cc-defs.el.orig	2009-09-14 22:42:07.000000000 +0100
+++ ./lisp/progmodes/cc-defs.el	2009-09-14 22:42:46.000000000 +0100
@@ -105,10 +105,10 @@ (defvar c-buffer-is-cc-mode nil
   "Non-nil for all buffers with a major mode derived from CC Mode.
 Otherwise, this variable is nil.  I.e. this variable is non-nil for
 `c-mode', `c++-mode', `objc-mode', `java-mode', `idl-mode',
-`pike-mode', `awk-mode', and any other non-CC Mode mode that calls
-`c-initialize-cc-mode'.  The value is the mode symbol itself
-\(i.e. `c-mode' etc) of the original CC Mode mode, or just t if it's
-not known.")
+`pike-mode', `awk-mode', `php-mode', `js-mode', and any other non-CC Mode
+mode that calls `c-initialize-cc-mode'.  The value is the mode symbol
+itself (i.e. `c-mode' etc) of the original CC Mode mode, or just t if
+it's not known.")
 (make-variable-buffer-local 'c-buffer-is-cc-mode)
 
 ;; Have to make `c-buffer-is-cc-mode' permanently local so that it
@@ -422,7 +422,7 @@ (defmacro c-save-buffer-state (varlist &
 The return value is the value of the last form in BODY."
   `(let* ((modified (buffer-modified-p)) (buffer-undo-list t)
 	  (inhibit-read-only t) (inhibit-point-motion-hooks t)
-	  before-change-functions after-change-functions
+	  (inhibit-modification-hooks t)
 	  deactivate-mark
 	  buffer-file-name buffer-file-truename ; Prevent primitives checking
 						; for file modification
@@ -1233,7 +1233,10 @@ (put 'java-mode 'c-mode-prefix "java-")
 (put 'idl-mode  'c-mode-prefix "idl-")
 (put 'pike-mode 'c-mode-prefix "pike-")
 (put 'awk-mode  'c-mode-prefix "awk-")
+(put 'php-mode  'c-mode-prefix "php-")
+(put 'js-mode  'c-mode-prefix "js-")
+(put 'csharp-mode  'c-mode-prefix "csharp-")
 
 (defsubst c-mode-symbol (suffix)
   "Prefix the current mode prefix (e.g. \"c-\") to SUFFIX and return
--- ./lisp/progmodes/cc-langs.el.orig	2009-09-14 22:42:07.000000000 +0100
+++ ./lisp/progmodes/cc-langs.el	2009-09-14 22:42:46.000000000 +0100
@@ -353,7 +353,7 @@ (defun c-populate-syntax-table (table)
   (modify-syntax-entry ?\^m "> b" table))
 
 (c-lang-defconst c-make-mode-syntax-table
-  "Functions that generates the mode specific syntax tables.
+  "Functions that generate the mode specific syntax tables.
 The syntax tables aren't stored directly since they're quite large."
   t `(lambda ()
        (let ((table (make-syntax-table)))
@@ -366,7 +366,12 @@ (c-lang-defconst c-make-mode-syntax-tabl
 		 ;; every keyword is a single symbol.
 		 `(modify-syntax-entry ?@ "_" table))
 		((c-major-mode-is 'pike-mode)
-		 `(modify-syntax-entry ?@ "." table)))
+		 `(modify-syntax-entry ?@ "." table))
+		((c-major-mode-is 'php-mode)
+		 `(modify-syntax-entry ?# "< b" table))
+		((c-major-mode-is 'php-mode)
+		 `(modify-syntax-entry ?` "\"" table))
+		)
 	 table)))
 
 (c-lang-defconst c-mode-syntax-table
@@ -475,7 +480,9 @@ (c-lang-defconst c-symbol-start
 operator at the top level."
   t    (concat "[" c-alpha "_]")
   objc (concat "[" c-alpha "@]")
-  pike (concat "[" c-alpha "_`]"))
+  pike (concat "[" c-alpha "_`]")
+  (php js)  (concat "[" c-alpha "_$]")
+  csharp (concat "[" c-alpha "@_]"))
 (c-lang-defvar c-symbol-start (c-lang-const c-symbol-start))
 
 (c-lang-defconst c-symbol-chars
@@ -484,7 +491,8 @@ (c-lang-defconst c-symbol-chars
   ;; Pike note: With the backquote identifiers this would include most
   ;; operator chars too, but they are handled with other means instead.
   t    (concat c-alnum "_$")
-  objc (concat c-alnum "_$@"))
+  objc (concat c-alnum "_$@")
+  csharp (concat c-alnum "_"))
 
 (c-lang-defconst c-symbol-key
   "Regexp matching identifiers and keywords (with submatch 0).  Assumed
@@ -541,7 +549,10 @@ (c-lang-defconst c-identifier-ops
 	 (prefix "::"))
   pike '((left-assoc "::")
 	 (prefix "::")
-	 (left-assoc ".")))
+	 (left-assoc "."))
+  php  '((left-assoc "::")
+	 (prefix "::"))
+  java '((left-assoc ".")))
 
 (c-lang-defconst c-opt-identifier-concat-key
   ;; Appendable adorned regexp matching the operators that join
@@ -670,7 +681,7 @@ (c-lang-defconst c-identifier-last-sym-m
   t nil)
 
 (c-lang-defconst c-string-escaped-newlines
-  "Set if the language support backslash escaped newlines inside string
+  "Set if the language supports backslash escaped newlines inside string
 literals."
   t nil
   (c c++ objc pike) t)
@@ -683,7 +694,8 @@ (c-lang-defconst c-multiline-string-star
 only literals where the open quote is immediately preceded by that
 literal are multiline."
   t    nil
-  pike ?#)
+  pike ?#
+  (php js) t)
 (c-lang-defvar c-multiline-string-start-char
   (c-lang-const c-multiline-string-start-char))
 
@@ -694,7 +706,8 @@ (c-lang-defconst c-opt-cpp-prefix
   ;; TODO (ACM, 2005-04-01).  Amend the following to recognise escaped NLs;
   ;; amend all uses of c-opt-cpp-prefix which count regexp-depth.
   t "\\s *#\\s *"
-  (java awk) nil)
+  (java awk js) nil
+  php "\\s-*\\(?:<\\?php\\|\\?>\\|<%=?\\|%>\\)") ; fixme: probably has to go in cc-fonts
 (c-lang-defvar c-opt-cpp-prefix (c-lang-const c-opt-cpp-prefix))
 
 (c-lang-defconst c-anchored-cpp-prefix
@@ -713,7 +726,8 @@ (c-lang-defconst c-opt-cpp-start
 		   "\\([" c-alnum "]+\\)"))
   ;; Pike, being a scripting language, recognizes hash-bangs too.
   pike (concat (c-lang-const c-opt-cpp-prefix)
-	       "\\([" c-alnum "]+\\|!\\)"))
+	       "\\([" c-alnum "]+\\|!\\)")
+  php  (c-lang-const c-opt-cpp-prefix))
 (c-lang-defvar c-opt-cpp-start (c-lang-const c-opt-cpp-start))
 
 (c-lang-defconst c-cpp-message-directives
@@ -778,7 +792,9 @@ (c-lang-defconst c-assignment-operators
 	       '(">>>="))
   c++  (append (c-lang-const c-assignment-operators)
 	       '("and_eq" "or_eq" "xor_eq" "??!=" "??'="))
-  idl  nil)
+  idl  nil
+  php  (append (c-lang-const c-assignment-operators) '(".="))
+  js   (append (c-lang-const c-assignment-operators) '(">>>=")))
 
 (c-lang-defconst c-operators
   "List describing all operators, along with their precedence and
@@ -860,7 +876,16 @@ (c-lang-defconst c-operators
 		      ((c-major-mode-is 'java-mode)
 		       '("new"))
 		      ((c-major-mode-is 'pike-mode)
-		       '("class" "lambda" "catch" "throw" "gauge")))
+		       '("class" "lambda" "catch" "throw" "gauge"))
+		      ((c-major-mode-is 'php-mode)
+		       '("new"))
+		      ((c-major-mode-is 'js-mode)
+		       '("new" "typeof" "void" "delete" "clone"))
+		      ((c-major-mode-is 'csharp)
+		       ((prefix "base" "ref" "out" "typeof" "checked"
+				"unchecked" "default" "sizeof"))))
+	      ,@(when (c-major-mode-is 'php-mode)
+		  '("&" "@"))
 	      "(" ")"			; Cast.
 	      ,@(when (c-major-mode-is 'pike-mode)
 		  '("[" "]")))		; Type cast.
@@ -877,17 +902,22 @@ (c-lang-defconst c-operators
 
       ;; Shift.
       (left-assoc "<<" ">>"
-		  ,@(when (c-major-mode-is 'java-mode)
+		  ,@(when (c-major-mode-is '(java-mode js-mode))
 		      '(">>>")))
 
       ;; Relational.
       (left-assoc "<" ">" "<=" ">="
 		  ,@(when (c-major-mode-is 'java-mode)
-		      '("instanceof")))
+		      '("instanceof"))
+		  ,@(when (c-major-mode-is '(java-mode js-mode))
+		      '("instanceof" "in"))
+		  ,@(when (c-major-mode-is '(csharp-mode))
+		      '("is" "as" "in")))
 
       ;; Equality.
       (left-assoc "==" "!="
-		  ,@(when (c-major-mode-is 'c++-mode) '("not_eq")))
+		  ,@(when (c-major-mode-is 'c++-mode) '("not_eq"))
+		  ,@(when (c-major-mode-is 'js-mode) '("===" "!==")))
 
       ;; Bitwise and.
       (left-assoc "&"
@@ -897,7 +927,8 @@ (c-lang-defconst c-operators
       (left-assoc "^"
 		  ,@(when (c-major-mode-is '(c-mode c++-mode))
 		      '("??'"))
-		  ,@(when (c-major-mode-is 'c++-mode) '("xor")))
+		  ,@(when (c-major-mode-is 'c++-mode) '("xor"))
+		  ,@(when (c-major-mode-is 'php-mode) '("xor")))
 
       ;; Bitwise or.
       (left-assoc "|"
@@ -907,13 +938,15 @@ (c-lang-defconst c-operators
 
       ;; Logical and.
       (left-assoc "&&"
-		  ,@(when (c-major-mode-is 'c++-mode) '("and")))
+		  ,@(when (c-major-mode-is 'c++-mode) '("and"))
+		  ,@(when (c-major-mode-is 'php-mode) '("and")))
 
       ;; Logical or.
       (left-assoc "||"
 		  ,@(when (c-major-mode-is '(c-mode c++-mode))
 		      '("??!??!"))
-		  ,@(when (c-major-mode-is 'c++-mode) '("or")))
+		  ,@(when (c-major-mode-is 'c++-mode) '("or"))
+		  ,@(when (c-major-mode-is 'php-mode) '("or")))
 
       ;; Conditional.
       (right-assoc-sequence "?" ":")
@@ -1018,6 +1051,8 @@ (c-lang-defconst c-other-op-syntax-token
   pike (append '("..")
 	       (c-lang-const c-other-op-syntax-tokens)
 	       (c-lang-const c-overloadable-operators))
+  php  (append '("&")
+	       (c-lang-const c-other-op-syntax-tokens))
   awk '("{" "}" "(" ")" "[" "]" ";" "," "=" "/"))
 
 (c-lang-defconst c-all-op-syntax-tokens
@@ -1456,7 +1491,7 @@ (c-lang-setvar end-of-defun-function (c-
 (c-lang-defconst c-paragraph-start
   "Regexp to append to `paragraph-start'."
   t    "$"
-  java "\\(@[a-zA-Z]+\\>\\|$\\)"	; For Javadoc.
+  (java php) "\\(@[a-zA-Z]+\\>\\|$\\)"	; For Javadoc.
   pike "\\(@[a-zA-Z_-]+\\>\\([^{]\\|$\\)\\|$\\)") ; For Pike refdoc.
 (c-lang-defvar c-paragraph-start (c-lang-const c-paragraph-start))
 
@@ -1510,7 +1545,11 @@ (c-lang-defconst c-primitive-type-kwds
   pike '(;; this_program isn't really a keyword, but it's practically
 	 ;; used as a builtin type.
 	 "array" "float" "function" "int" "mapping" "mixed" "multiset"
-	 "object" "program" "string" "this_program" "void"))
+	 "object" "program" "string" "this_program" "void")
+  php  '("int" "integer" "double" "real" "float" "bool" "boolean"
+	 "string" "object" "array")
+  csharp '("bool" "decimal" "sbyte" "byte" "short" "ushort"  "int" "uint"
+	   "long" "ulong" "char" "float" "double" "object" "string" "void"))
 
 (c-lang-defconst c-primitive-type-key
   ;; An adorned regexp that matches `c-primitive-type-kwds'.
@@ -1537,7 +1576,8 @@ (c-lang-defconst c-type-prefix-kwds
   t    nil
   c    '("struct" "union" "enum")
   c++  (append '("class" "typename")
-	       (c-lang-const c-type-prefix-kwds c)))
+	       (c-lang-const c-type-prefix-kwds c))
+  csharp '("enum" "struct"))
 
 (c-lang-defconst c-type-prefix-key
   ;; Adorned regexp matching `c-type-prefix-kwds'.
@@ -1552,7 +1592,8 @@ (c-lang-defconst c-type-modifier-kwds
   t    nil
   c    '("const" "restrict" "volatile")
   c++  '("const" "volatile" "throw")
-  objc '("const" "volatile"))
+  objc '("const" "volatile")
+  csharp '("const" "volatile" "readonly"))
 
 (c-lang-defconst c-opt-type-modifier-key
   ;; Adorned regexp matching `c-type-modifier-kwds', or nil in
@@ -1604,7 +1645,9 @@ (c-lang-defconst c-class-decl-kwds
 	 "storagehome" "storagetype"
 	 ;; In CORBA CIDL:
 	 "catalog" "executor" "manages" "segment")
-  pike '("class"))
+  pike '("class")
+  php  '("class" "interface")
+  csharp '("struct"))
 
 (c-lang-defconst c-class-key
   ;; Regexp matching the start of a class.
@@ -1620,7 +1663,7 @@ (c-lang-defconst c-brace-list-decl-kwds
 `c-<>-type-kwds', or `c-<>-arglist-kwds' then the associated clauses
 will be handled."
   t    '("enum")
-  (java awk) nil)
+  (java awk php js) nil)
 
 (c-lang-defconst c-brace-list-key
   ;; Regexp matching the start of declarations where the following
@@ -1653,7 +1696,8 @@ (c-lang-defconst c-other-block-decl-kwds
   c++ '("namespace" "extern")
   idl '("module"
 	;; In CORBA CIDL:
-	"composition"))
+	"composition")
+  csharp '("namespace"))
 
 (c-lang-defconst c-other-decl-block-key
   ;; Regexp matching the start of blocks besides classes that contain
@@ -1714,7 +1758,11 @@ (c-lang-defconst c-typeless-decl-kwds
 		 ;; In CORBA CIDL:
 		 "facet"))
   pike (append (c-lang-const c-class-decl-kwds)
-	       '("constant")))
+	       '("constant"))
+  php  (append (c-lang-const c-class-decl-kwds) '("function"))
+  js   (append (c-lang-const c-class-decl-kwds) '("var"
+						  "const" ; Mozilla extension
+						  "function")))
 
 (c-lang-defconst c-modifier-kwds
   "Keywords that can prefix normal declarations of identifiers
@@ -1743,7 +1791,10 @@ (c-lang-defconst c-modifier-kwds
   java '("abstract" "const" "final" "native" "private" "protected" "public"
 	 "static" "strictfp" "synchronized" "transient" "volatile")
   pike '("final" "inline" "local" "nomask" "optional" "private" "protected"
-	 "public" "static" "variant"))
+	 "public" "static" "variant")
+  php  '("static" "const" "private" "protected" "public" "final")
+  csharp '("using" "new" "public" "protected" "internal" "private" "abstract"
+	   "sealed" "static" "event" "const" "params" "override"))
 
 (c-lang-defconst c-other-decl-kwds
   "Keywords that can start or prefix any declaration level construct,
@@ -1874,7 +1925,8 @@ (c-lang-defconst c-block-decls-with-vars
 `*-decl-kwds' lists."
   t        nil
   (c objc) '("struct" "union" "enum" "typedef")
-  c++      '("class" "struct" "union" "enum" "typedef"))
+  c++      '("class" "struct" "union" "enum" "typedef")
+  csharp   '("enum" "struct"))
 
 (c-lang-defconst c-opt-block-decls-with-vars-key
   ;; Regexp matching the `c-block-decls-with-vars' keywords, or nil in
@@ -1893,7 +1945,8 @@ (c-lang-defconst c-postfix-decl-spec-kwd
   idl  '("context" "getraises" "manages" "primarykey" "raises" "setraises"
 	 "supports"
 	 ;; In CORBA PSDL:
-	 "as" "const" "implements" "of" "ref"))
+	 "as" "const" "implements" "of" "ref")
+  php  '("extends" "implements"))
 
 (c-lang-defconst c-nonsymbol-sexp-kwds
   "Keywords that may be followed by a nonsymbol sexp before whatever
@@ -1909,7 +1962,7 @@ (c-lang-defconst c-type-list-kwds
 
 Assumed to be mutually exclusive with `c-ref-list-kwds'.  There's no
 reason to put keywords on this list if they are on `c-type-prefix-kwds'.
-There's also no reason to add keywords that prefixes a normal
+There's also no reason to add keywords that prefix a normal
 declaration consisting of a type followed by a declarator (list), so
 the keywords on `c-modifier-kwds' should normally not be listed here
 either.
@@ -1923,7 +1976,9 @@ (c-lang-defconst c-type-list-kwds
   idl  '("manages" "native" "primarykey" "supports"
 	 ;; In CORBA PSDL:
 	 "as" "implements" "of" "scope")
-  pike '("inherit"))
+  pike '("inherit")
+  php  '("extends" "interface" "implements")
+  js   '("import" "export"))		; Mozilla extensions
 
 (c-lang-defconst c-ref-list-kwds
   "Keywords that may be followed by a comma separated list of
@@ -1951,7 +2006,10 @@ (c-lang-defconst c-colon-type-list-kwds
   c++  '("class" "struct")
   idl  '("component" "eventtype" "home" "interface" "valuetype"
 	 ;; In CORBA PSDL:
-	 "storagehome" "storagetype"))
+	 "storagehome" "storagetype")
+  ;; Fixme: This doesn't work:
+  ;; csharp '("enum")
+  )
 
 (c-lang-defconst c-colon-type-list-re
   "Regexp matched after the keywords in `c-colon-type-list-kwds' to skip
@@ -2033,8 +2091,10 @@ (c-lang-defconst c-block-stmt-1-kwds
   t    '("do" "else")
   c++  '("do" "else" "try")
   objc '("do" "else" "@finally" "@try")
-  java '("do" "else" "finally" "try")
-  idl  nil)
+  (java js) '("do" "else" "finally" "try")
+  idl  nil
+  php  '("do" "else" "elseif" "try" "finally")                                
+  csharp '("do" "else" "try" "finally" "checked" "unchecked"))
 
 (c-lang-defconst c-block-stmt-1-key
   ;; Regexp matching the start of any statement followed directly by a
@@ -2050,7 +2110,13 @@ (c-lang-defconst c-block-stmt-2-kwds
   java '("for" "if" "switch" "while" "catch" "synchronized")
   idl  nil
   pike '("for" "if" "switch" "while" "foreach")
-  awk  '("for" "if" "while"))
+  awk  '("for" "if" "while")
+  php  '("for" "if" "switch" "while" "declare" "foreach"
+	 ;; fixme: check catch/catch all
+	 "catch")
+  js   '("for" "if" "switch" "while" "catch" "with")
+  csharp '("if" "switch" "while" "for" "foreach" "catch" "with" "lock"
+	   "using"))
 
 (c-lang-defconst c-block-stmt-2-key
   ;; Regexp matching the start of any statement followed by a paren sexp
@@ -2085,7 +2151,13 @@ (c-lang-defconst c-simple-stmt-kwds
   pike '("break" "continue" "return")
   awk  '(;; Not sure about "delete", "exit", "getline", etc. ; ACM 2002/5/30
 	 "break" "continue" "return" "delete" "exit" "getline" "next"
-	 "nextfile" "print" "printf"))
+	 "nextfile" "print" "printf")
+  php  '("break" "continue" "return" "echo" "die" "exit" "include"
+	 "include_once" "print" "require" "require_once" "define" "throw")
+  js   '("include"			; Mozilla extension
+	 "break" "continue" "goto" "return" "throw")
+  csharp '("break" "continue" "goto" "return" "throw" "yield break"
+	   "yield return"))
 
 (c-lang-defconst c-simple-stmt-key
   ;; Adorned regexp matching `c-simple-stmt-kwds'.
@@ -2139,10 +2211,11 @@ (c-lang-defvar c-label-kwds-regexp (c-la
 (c-lang-defconst c-before-label-kwds
   "Keywords that might be followed by a label identifier."
   t    '("goto")
-  (java pike) (append '("break" "continue")
-		      (c-lang-const c-before-label-kwds))
+  (java pike js) (append '("break" "continue")
+			 (c-lang-const c-before-label-kwds))
   idl  nil
-  awk  nil)
+  awk  nil
+  php  nil)
 
 (c-lang-defconst c-constant-kwds
   "Keywords for constants."
@@ -2152,7 +2225,10 @@ (c-lang-defconst c-constant-kwds
   objc    '("nil" "Nil" "YES" "NO" "NS_DURING" "NS_HANDLER" "NS_ENDHANDLER")
   idl     '("TRUE" "FALSE")
   java    '("true" "false" "null") ; technically "literals", not keywords
-  pike    '("UNDEFINED")) ;; Not a keyword, but practically works as one.
+  pike    '("UNDEFINED") ;; Not a keyword, but practically works as one.
+  php     '("__LINE__" "__FILE__" "__FUNCTION__" "__CLASS__" "__METHOD__"
+	    "NULL")
+  (js csharp) '("true" "false" "null"))
 
 (c-lang-defconst c-primary-expr-kwds
   "Keywords besides constants and operators that start primary expressions."
@@ -2160,7 +2236,9 @@ (c-lang-defconst c-primary-expr-kwds
   c++  '("operator" "this")
   objc '("super" "self")
   java '("this")
-  pike '("this")) ;; Not really a keyword, but practically works as one.
+  pike '("this") ; Not really a keyword, but practically works as one.
+  js   '("this") ; likewise
+  csharp '("this" "base"))
 
 (c-lang-defconst c-expr-kwds
   ;; Keywords that can occur anywhere in expressions.  Built from
@@ -2176,7 +2254,9 @@ (c-lang-defconst c-lambda-kwds
   "Keywords that start lambda constructs, i.e. function definitions in
 expressions."
   t    nil
-  pike '("lambda"))
+  pike '("lambda")
+  ;; Fixme:  This breaks normal functions.
+  js   '("function"))
 
 (c-lang-defconst c-inexpr-block-kwds
   "Keywords that start constructs followed by statement blocks which can
@@ -2247,7 +2327,17 @@ (c-lang-defconst c-other-kwds
   idl  '("truncatable"
 	 ;; In CORBA CIDL: (These are declaration keywords that never
 	 ;; can start a declaration.)
-	 "entity" "process" "service" "session" "storage"))
+	 "entity" "process" "service" "session" "storage")
+  php  '("isset" "list" "array" "unset" "exception" "eval" "as")
+  ;; Reserved for future use (ECMA) :
+  js   '("abstract" "enum" "int" "short" "boolean" "export" "interface"
+	 "static" "byte" "extends" "long" "super" "char" "final" "native"
+	 "synchronized" "class" "float" "package" "throws"
+	 ;; "const"
+	 "goto" "private" "transient" "debugger" "implements" "protected"
+	 "volatile" "double"
+	 ;; "import"
+	 "public"))
 
 
 ;;; Constants built from keywords.
@@ -2629,7 +2719,8 @@ (c-lang-defconst c-type-decl-prefix-key
 	       (c-lang-const c-type-decl-prefix-key)
 	       "\\)"
 	       "\\([^=]\\|$\\)")
-  pike "\\(\\*\\)\\([^=]\\|$\\)")
+  pike "\\(\\*\\)\\([^=]\\|$\\)"
+  php  "&")
 (c-lang-defvar c-type-decl-prefix-key (c-lang-const c-type-decl-prefix-key)
   'dont-doc)
 
@@ -2763,7 +2854,7 @@ (c-lang-defvar c-known-type-key
 
 (c-lang-defconst c-special-brace-lists
 "List of open- and close-chars that makes up a pike-style brace list,
-i.e. for a ([]) list there should be a cons (?\\[ . ?\\]) in this
+i.e. for a ([]) list there should be a cons (?\\[ . ?\\]) in this
 list."
   t    nil
   pike '((?{ . ?}) (?\[ . ?\]) (?< . ?>)))
@@ -2866,7 +2957,7 @@ (c-lang-defconst c-recognize-colon-label
 not apply to labels recognized by `c-label-kwds' and
 `c-opt-extra-label-key'."
   t nil
-  (c c++ objc java pike) t)
+  (c c++ objc java pike js csharp) t)
 (c-lang-defvar c-recognize-colon-labels
   (c-lang-const c-recognize-colon-labels))
 
@@ -2874,8 +2965,9 @@ (c-lang-defconst c-label-prefix-re
   "Regexp like `c-decl-prefix-re' that matches any token that can precede
 a generic colon label.  Not used if `c-recognize-colon-labels' is
 nil."
-  t "\\([{};]+\\)")
+  t "\\([{};]+\\)"
+  js "\\([{},]+\\)")
 (c-lang-defvar c-label-prefix-re
   (c-lang-const c-label-prefix-re))
 
--- ./lisp/progmodes/cc-mode.el.orig	2009-09-14 22:42:07.000000000 +0100
+++ ./lisp/progmodes/cc-mode.el	2009-09-14 22:42:46.000000000 +0100
@@ -170,6 +170,9 @@ (defun c-init-language-vars-for (mode)
 	((eq mode 'idl-mode)  (c-init-language-vars idl-mode))
 	((eq mode 'pike-mode) (c-init-language-vars pike-mode))
 	((eq mode 'awk-mode)  (c-init-language-vars awk-mode))
+	((eq mode 'php-mode)  (c-init-language-vars php-mode))
+	((eq mode 'js-mode)   (c-init-language-vars js-mode))
+	((eq mode 'csharp-mode) (c-init-language-vars csharp-mode))
 	(t (error "Unsupported mode %s" mode))))
 
 ;;;###autoload
@@ -1557,7 +1560,200 @@ (defun awk-mode ()
   (c-update-modeline))
 
 
+;; Support for PHP
+
+(defvar php-mode-syntax-table
+  (funcall (c-lang-const c-make-mode-syntax-table php))
+  "Syntax table used in PHP mode buffers.")
+
+(defvar php-mode-abbrev-table nil
+  "Abbreviation table used in PHP mode buffers.")
+(c-define-abbrev-table 'php-mode-abbrev-table
+  '(("else" "else" c-electric-continued-statement 0)
+    ("while" "while" c-electric-continued-statement 0)))
+
+(defvar php-mode-map (c-make-inherited-keymap)
+  "Keymap used in PHP mode buffers.")
+
+(easy-menu-define c-php-menu php-mode-map "PHP Mode Commands"
+		  (cons "PHP" (c-lang-const c-mode-menu php)))
+
+;; Fixme: Deal with here-docs -- copy stuff from sh-script.el
+(defconst php-mode-syntactic-keywords
+  '(
+    ;; (Pseudo-)processing instructions
+    ("\\(<\\)\\?\\(?:\\-*php\\)?\\([[:space:]\n]\\)" (1 "!") (2 "!"))
+    ("[?%]>" (0 "!"))
+    ("\\(<\\)%=?\\([[:space:]\n]\\)" (1 "!") (2 "!"))))
+
+;; fixme: add manual lookup stuff, maybe speedbar
+
+;;;###autoload
+(defun php-mode ()
+  "Major mode for editing PHP code.
+Doesn't cope with the `alternative' (Algol-ish) syntax, only the
+C-like one.
+
+Note that this is specifically for actual PHP code and doesn't cope
+with it being embedded in HTML -- that requires a multiple-major-modes
+package.
+
+The hook `c-mode-common-hook' is run with no args at mode
+initialization, then `php-mode-hook'.
+
+Key bindings:
+\\{php-mode-map}"
+  (interactive)
+  (kill-all-local-variables)
+  (c-initialize-cc-mode t)
+  (set-syntax-table php-mode-syntax-table)
+  (setq major-mode 'php-mode
+ 	mode-name "PHP"
+ 	local-abbrev-table php-mode-abbrev-table
+	comment-start "// "
+	comment-end "")
+  (use-local-map php-mode-map)
+  (c-init-language-vars-for 'php-mode)
+  (c-common-init 'php-mode)
+  (easy-menu-add c-php-menu)
+  (cc-imenu-init cc-imenu-php-generic-expression)
+  (set (make-local-variable 'font-lock-syntactic-keywords)
+       php-mode-syntactic-keywords)
+  (set (make-local-variable 'parse-sexp-lookup-properties) t)
+  (c-run-mode-hooks 'c-mode-common-hook 'php-mode-hook)
+  (c-update-modeline))
+
+;; Support for JavaScript
+
+(defvar js-mode-syntax-table
+  (funcall (c-lang-const c-make-mode-syntax-table js))
+  "Syntax table used in JavaScript mode buffers.")
+
+(defvar js-mode-abbrev-table nil
+  "Abbreviation table used in JavaScript mode buffers.")
+(c-define-abbrev-table 'js-mode-abbrev-table
+  '(("else" "else" c-electric-continued-statement 0)
+    ("while" "while" c-electric-continued-statement 0)
+    ("catch" "catch" c-electric-continued-statement 0)
+    ("finally" "finally" c-electric-continued-statement 0)))
+
+(defvar js-mode-map (c-make-inherited-keymap)
+  "Keymap used in JavaScript mode buffers.")
+
+(easy-menu-define c-js-menu js-mode-map "JavaScript Mode Commands"
+		  (cons "JavaScript" (c-lang-const c-mode-menu js)))
+
+(defconst js-mode-syntactic-keywords
+  `((,(concat "[=\(,]\\s-*"		; only assignment or arg list
+	      "\\(/\\)"			; initial slash
+	      "\\(?:\\\\.\\|[^*/]\\)"	; initially either escaped
+					; char or char which isn't
+					; part of comment start
+	      "\\(?:\\\\.\\|[^/]\\)*" ; repeated escaped char or non-slash
+	      "\\(?:/[gim]*\\([gim]\\)\\|\\(/\\)\\)")	; final slash with
+						; optional qualifier
+     (1 "|") (2 "|" nil t) (3 "|" nil t)))
+  "`font-lock-syntactic-keywords' for JavaScript.
+Deals with /.../ regexp patterns.")
+
+;;;###autoload
+(defun js-mode ()
+  "Major mode for editing JavaScript/ECMAScript code.
+
+This is intended to support the definition in ECMA standard 262
+<URL:http://www.ecma-international.org/publications/standards/ECMA-262.HTM>
+with Mozilla extensions
+<URL:http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference>.
+
+The hook `c-mode-common-hook' is run with no args at mode
+initialization, then `js-mode-hook'.
+
+Key bindings:
+\\{js-mode-map}"
+  (interactive)
+  (kill-all-local-variables)
+  (c-initialize-cc-mode t)
+  (set-syntax-table js-mode-syntax-table)
+  (setq major-mode 'js-mode
+ 	mode-name "JS"
+ 	local-abbrev-table js-mode-abbrev-table
+	comment-start "// "
+	comment-end "")
+  (use-local-map js-mode-map)
+  (c-init-language-vars-for 'js-mode)
+  (c-common-init 'js-mode)
+  (easy-menu-add c-js-menu)
+  (cc-imenu-init cc-imenu-js-generic-expression)
+  (set (make-local-variable 'font-lock-syntactic-keywords)
+       js-mode-syntactic-keywords)
+  (set (make-local-variable 'parse-sexp-lookup-properties) t)
+  (c-run-mode-hooks 'c-mode-common-hook 'js-mode-hook)
+  (c-update-modeline))
+
+;; Fixme: Should probably have inferior JavaScript mode.
+
+(defalias 'javascript-mode 'js-mode)
+
+;; Support for C#
+
+(defvar csharp-mode-syntax-table
+  (funcall (c-lang-const c-make-mode-syntax-table csharp))
+  "Syntax table used in C# mode buffers.")
+
+(defvar csharp-mode-abbrev-table nil
+  "Abbreviation table used in C# mode buffers.")
+(c-define-abbrev-table 'js-mode-abbrev-table
+  '(("else" "else" c-electric-continued-statement 0)
+    ("while" "while" c-electric-continued-statement 0)
+    ("catch" "catch" c-electric-continued-statement 0)
+    ("finally" "finally" c-electric-continued-statement 0)))
+
+(defvar csharp-mode-map (c-make-inherited-keymap)
+  "Keymap used in C# mode buffers.")
+
+(easy-menu-define c-csharp-menu csharp-mode-map "C# Mode Commands"
+		  (cons "C#" (c-lang-const c-mode-menu csharp)))
+
+(defconst csharp-mode-syntactic-keywords
+  '(("\\(@\\)\"\\(?:\"\"\\|[^\"]\\)+\\(\"\\)"
+    (1 "|") (2 "|")))
+  "`font-lock-syntactic-keywords' for C#.
+Deals with @\"...\" literals.")
+
+;;;###autoload
+(defun csharp-mode ()
+  "Major mode for editing C# code.
+
+This is intended to support the definition in ECMA standard 334
+<URL:http://www.ecma-international.org/publications/standards/ECMA-334.HTM>.
+
+The hook `c-mode-common-hook' is run with no args at mode
+initialization, then `csharp-mode-hook'.
+
+Key bindings:
+\\{csharp-mode-map}"
+  (interactive)
+  (kill-all-local-variables)
+  (c-initialize-cc-mode t)
+  (set-syntax-table csharp-mode-syntax-table)
+  (setq major-mode 'csharp-mode
+ 	mode-name "C#"
+ 	local-abbrev-table csharp-mode-abbrev-table
+	comment-start "// "
+	comment-end "")
+  (use-local-map csharp-mode-map)
+  (c-init-language-vars-for 'csharp-mode)
+  (c-common-init 'csharp-mode)
+  (easy-menu-add c-csharp-menu)
+  (cc-imenu-init cc-imenu-java-generic-expression) ; fixme
+  (set (make-local-variable 'font-lock-syntactic-keywords)
+       csharp-mode-syntactic-keywords)
+  (set (make-local-variable 'parse-sexp-lookup-properties) t)
+  (c-run-mode-hooks 'c-mode-common-hook 'csharp-mode-hook)
+  (c-update-modeline))
+
+
 ;; bug reporting
 
 (defconst c-mode-help-address
--- ./doc/misc/cc-mode.texi.orig	2009-02-16 17:41:59.000000000 +0000
+++ ./doc/misc/cc-mode.texi	2009-09-14 22:39:21.000000000 +0100
@@ -181,7 +181,8 @@ (a) The FSF's Back-Cover Text is: ``You 
 @dircategory Emacs
 @direntry
 * CC Mode: (ccmode).    Emacs mode for editing C, C++, Objective-C,
-                        Java, Pike, AWK, and CORBA IDL code.
+                        Java, Pike, AWK, PHP, JavaScript, C#,
+                         and CORBA IDL code.
 @end direntry
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -221,7 +222,8 @@ (a) The FSF's Back-Cover Text is: ``You 
 @top @ccmode{}
 
 @ccmode{} is a GNU Emacs mode for editing files containing C, C++,
-Objective-C, Java, CORBA IDL (and the variants PSDL and CIDL), Pike
+Objective-C, Java, CORBA IDL (and the variants PSDL and CIDL), Pike,
+PHP, JavaScript/ECMAScript, C#,
 and AWK code.  It provides syntax-based indentation, font locking, and
 has several handy commands and some minor modes to make the editing
 easier.  It does not provide tools to look up and navigate between
@@ -359,7 +361,12 @@ (a) The FSF's Back-Cover Text is: ``You 
 
 Welcome to @ccmode{}, a GNU Emacs mode for editing files containing C,
 C++, Objective-C, Java, CORBA IDL (and the variants CORBA PSDL and
-CIDL), Pike and AWK code.  This incarnation of the mode is descended
+CIDL), Pike, PHP@footnote{Note that the @code{php-mode} provided only
+deals with raw PHP code---not code embedded in HTML@.  You may be able
+to use a multiple-major-modes package for that.  Also it only supports
+the C-like syntax, not the `alternative' Algol-ish one.},
+JavaScript/ECMAScript and AWK code.
+This incarnation of the mode is descended
 from @file{c-mode.el} (also called ``Boring Old C Mode'' or BOCM
 @t{:-)}, @file{c++-mode.el} version 2, which Barry Warsaw had been
 maintaining since 1992, and @file{awk-mode.el}, a long neglected mode
@@ -380,7 +387,8 @@ (a) The FSF's Back-Cover Text is: ``You 
 @ccmode{} supports the editing of K&R and ANSI C, C++, Objective-C,
 Java, CORBA's Interface Definition Language, Pike@footnote{A C-like
 scripting language with its roots in the LPC language used in some MUD
-engines.  See @uref{http://pike.ida.liu.se/}.} and AWK files.  In this
+engines.  See @uref{http://pike.ida.liu.se/}.}, PHP,
+JavaScript/ECMAScript, C#, and AWK files.  In this
 way, you can easily set up consistent font locking and coding styles for
 use in editing all of these languages, although AWK is not yet as
 uniformly integrated as the other languages.
@@ -391,13 +399,20 @@ (a) The FSF's Back-Cover Text is: ``You 
 @findex java-mode
 @findex idl-mode
 @findex pike-mode
+@findex php-mode
 @findex awk-mode
+@findex js-mode
+@findex javascript-mode
+@findex csharp-mode
 Note that the name of this package is ``@ccmode{}'', but there is no top
 level @code{cc-mode} entry point.  All of the variables, commands, and
 functions in @ccmode{} are prefixed with @code{c-@var{thing}}, and
 @code{c-mode}, @code{c++-mode}, @code{objc-mode}, @code{java-mode},
-@code{idl-mode}, @code{pike-mode}, and @code{awk-mode} entry points are
-provided.  This package is intended to be a replacement for
+@code{idl-mode}, @code{pike-mode}, @code{php-mode}, @code{js-mode},
+@code{javascript-mode}, @code{csharp-mode}, and @code{awk-mode} entry
+points are
+provided.  @code{javascript-mode} is an alias for @code{js-mode}.
+This package is intended to be a replacement for
 @file{c-mode.el}, @file{c++-mode.el} and @file{awk-mode.el}.
 
 A special word of thanks goes to Krishna Padmasola for his work in
@@ -1894,6 +1909,9 @@ (@pxref{Filling and Breaking}), is espec
 @defoptx java-font-lock-extra-types
 @defoptx idl-font-lock-extra-types
 @defoptx pike-font-lock-extra-types
+@defoptx php-font-lock-extra-types
+@defoptx js-font-lock-extra-types
+@defoptx csharp-font-lock-extra-types
 For each language there's a variable @code{*-font-lock-extra-types},
 where @samp{*} stands for the language in question.  It contains a list
 of regexps that matches identifiers that should be recognized as types,
@@ -2371,6 +2389,9 @@ (add-hook 'c-mode-common-hook 'my-turn-o
 @defvarx java-mode-hook
 @defvarx idl-mode-hook
 @defvarx pike-mode-hook
+@defvarx php-mode-hook
+@defvarx js-mode-hook
+@defvarx csharp-mode-hook
 @defvarx awk-mode-hook
 The language specific mode hooks.  The appropriate one is run as the
 last thing when you enter that language mode.
