From 786679719b2a44a226d7dc9d0c78d808eed21d30 Mon Sep 17 00:00:00 2001
From: Martin Stjernholm <mast@lysator.liu.se>
Date: Sun, 15 Aug 1999 15:32:52 +0200
Subject: [PATCH] Don't highlight the identifier after a cast. Some fixes.

Rev: lib/tools/pike.el:1.6
---
 lib/tools/pike.el | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/tools/pike.el b/lib/tools/pike.el
index 4893ff4a27..164edfae3b 100644
--- a/lib/tools/pike.el
+++ b/lib/tools/pike.el
@@ -1,5 +1,5 @@
 ;;; pike.el -- Major mode for editing Pike and other LPC files.
-;;; $Id: pike.el,v 1.5 1999/08/14 03:57:27 mast Exp $
+;;; $Id: pike.el,v 1.6 1999/08/15 13:32:52 mast Exp $
 ;;; Copyright (C) 1995, 1996, 1997, 1998, 1999 Per Hedbor.
 ;;; This file is distributed as GPL
 
@@ -207,7 +207,7 @@ The name is assumed to begin with a capital letter.")
 	    (list pike-font-lock-type-regexp
 		  '(1 font-lock-type-face)
 		  '(font-lock-match-pike-declarations
-		    (goto-char (match-end 0))
+		    (goto-char (match-end 1))
 		    (goto-char (match-end 0))
 		    (0 font-lock-variable-name-face)))
 
@@ -301,7 +301,14 @@ The name is assumed to begin with a capital letter.")
 ;; the cursor to fontify more identifiers.
 (defun font-lock-match-pike-declarations (limit)
   "Match and skip over variable definitions."
-  (while (looking-at ")")
+  (while (and (looking-at ")")
+	      (condition-case nil
+		  (save-excursion
+		    (up-list -1)
+		    (skip-syntax-backward " ")
+		    (skip-syntax-backward "w")
+		    (looking-at pike-font-lock-type-regexp))
+		(error nil)))
     (forward-char 1))
 ;  (if (looking-at "\\s *\\(\\[\\s *\\]\\s *\\)*")
 ;      (goto-char (match-end 0)))
-- 
GitLab