diff --git a/lib/tools/pike.el b/lib/tools/pike.el index 4893ff4a27331b2aaceafaa52021c3ec67ad7ea7..164edfae3b6646384dfd842f0a6d6a9e3cf811f7 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)))