diff lisp/packages/font-lock.el @ 48:56c54cf7c5b6 r19-16b90

Import from CVS: tag r19-16b90
author cvs
date Mon, 13 Aug 2007 08:56:04 +0200
parents 1a767b41a199
children 131b0175ea99
line wrap: on
line diff
--- a/lisp/packages/font-lock.el	Mon Aug 13 08:55:32 2007 +0200
+++ b/lisp/packages/font-lock.el	Mon Aug 13 08:56:04 2007 +0200
@@ -1101,8 +1101,6 @@
   (let* ((match (nth 0 highlight))
 	 (start (match-beginning match)) (end (match-end match))
 	 (override (nth 2 highlight)))
-    (and end
-	 (goto-char end)) ;; tlp00 hack to allow for back to back fonts
     (let ((newface (nth 1 highlight)))
       (or (symbolp newface)
 	  (setq newface (eval newface)))
@@ -1820,7 +1818,8 @@
    
    ;; In FSF this has the simpler definition of "\\sw+" for ctoken.
    ;; I'm not sure if ours is more correct.
-   (list (concat "^\\(" ctoken "\\)[ \t]*(") 1 'font-lock-function-name-face)
+   ;; This is a subset of the next rule, and is slower when present. --dmoore
+   ;; (list (concat "^\\(" ctoken "\\)[ \t]*(") 1 'font-lock-function-name-face)
    ;;
    ;; fontify the names of functions being defined.
    ;; FSF doesn't have this but I think it should be fast for us because
@@ -1829,13 +1828,17 @@
    ;; the time to do the regexp phase of font-lock for a C file!) Not
    ;; including this discriminates against those who don't follow the
    ;; GNU coding style. --ben
+   ;; x?x?x?y?z should always be: (x(xx?)?)?y?z --dmoore
    (list (concat
-          "^\\(" ctoken "[ \t]+\\)?"	; type specs; there can be no
-          "\\(" ctoken "[ \t]+\\)?"	; more than 3 tokens, right?
-          "\\(" ctoken "[ \t]+\\)?"
+	  "^\\("
+          "\\(" ctoken "[ \t]+\\)"	; type specs; there can be no
+	  "\\("
+          "\\(" ctoken "[ \t]+\\)"	; more than 3 tokens, right?
+          "\\(" ctoken "[ \t]+\\)"
+	  "?\\)?\\)?"
           "\\([*&]+[ \t]*\\)?"		; pointer
           "\\(" ctoken "\\)[ \t]*(")	; name
-         8 'font-lock-function-name-face)
+         10 'font-lock-function-name-face)
    ;;
    ;; This is faster but not by much.  I don't see why not.
    ;(list (concat "^\\(" ctoken "\\)[ \t]*(") 1 'font-lock-function-name-face)
@@ -1934,7 +1937,9 @@
   (append
    ;;
    ;; The list `c-font-lock-keywords-1' less that for function names.
-   (cdr c-font-lock-keywords-1)
+   ;; the simple function form regexp has been removed. --dmoore
+   ;;(cdr c-font-lock-keywords-1)
+   c-font-lock-keywords-1
    ;;
    ;; Fontify function name definitions, possibly incorporating class name.
    (list