Skip to content
Snippets Groups Projects
Commit 78667971 authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

Don't highlight the identifier after a cast. Some fixes.

Rev: lib/tools/pike.el:1.6
parent d70891b9
No related branches found
No related tags found
No related merge requests found
;;; pike.el -- Major mode for editing Pike and other LPC files. ;;; 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. ;;; Copyright (C) 1995, 1996, 1997, 1998, 1999 Per Hedbor.
;;; This file is distributed as GPL ;;; This file is distributed as GPL
...@@ -207,7 +207,7 @@ The name is assumed to begin with a capital letter.") ...@@ -207,7 +207,7 @@ The name is assumed to begin with a capital letter.")
(list pike-font-lock-type-regexp (list pike-font-lock-type-regexp
'(1 font-lock-type-face) '(1 font-lock-type-face)
'(font-lock-match-pike-declarations '(font-lock-match-pike-declarations
(goto-char (match-end 0)) (goto-char (match-end 1))
(goto-char (match-end 0)) (goto-char (match-end 0))
(0 font-lock-variable-name-face))) (0 font-lock-variable-name-face)))
...@@ -301,7 +301,14 @@ The name is assumed to begin with a capital letter.") ...@@ -301,7 +301,14 @@ The name is assumed to begin with a capital letter.")
;; the cursor to fontify more identifiers. ;; the cursor to fontify more identifiers.
(defun font-lock-match-pike-declarations (limit) (defun font-lock-match-pike-declarations (limit)
"Match and skip over variable definitions." "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)) (forward-char 1))
; (if (looking-at "\\s *\\(\\[\\s *\\]\\s *\\)*") ; (if (looking-at "\\s *\\(\\[\\s *\\]\\s *\\)*")
; (goto-char (match-end 0))) ; (goto-char (match-end 0)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment