comparison lisp/font-lock.el @ 243:f220cc83d72e r20-5b20

Import from CVS: tag r20-5b20
author cvs
date Mon, 13 Aug 2007 10:17:07 +0200
parents 0e522484dd2a
children 90d73dddcdc4
comparison
equal deleted inserted replaced
242:fc816b73a05f 243:f220cc83d72e
2315 (list (concat "\\<\\(package\\|import\\)\\>\\s *" 2315 (list (concat "\\<\\(package\\|import\\)\\>\\s *"
2316 java-font-lock-identifier-regexp) 2316 java-font-lock-identifier-regexp)
2317 '(2 font-lock-reference-face) 2317 '(2 font-lock-reference-face)
2318 (list (concat 2318 (list (concat
2319 "\\=\\.\\(" java-font-lock-identifier-regexp "\\)") 2319 "\\=\\.\\(" java-font-lock-identifier-regexp "\\)")
2320 nil nil '(1 (let ((c (char-after (match-end 0)))) 2320 nil nil '(1 (if (equal (char-after (match-end 0)) ?.)
2321 (if (and (characterp c) 2321 'font-lock-reference-face
2322 (= c ?.)) 2322 'font-lock-type-face))))
2323 'font-lock-reference-face 2323
2324 'font-lock-type-face)))))
2325
2326 ;; Constructors: 2324 ;; Constructors:
2327 (list (concat 2325 (list (concat
2328 "^\\s *\\(" java-modifier-regexp "\\s +\\)*" 2326 "^\\s *\\(" java-modifier-regexp "\\s +\\)*"
2329 java-font-lock-class-name-regexp "\\s *\(") 2327 java-font-lock-class-name-regexp "\\s *\(")
2330 (list 3 2328 (list 3
2367 java-font-lock-keywords-1 2365 java-font-lock-keywords-1
2368 (list 2366 (list
2369 ;; Keywords followed by a type: 2367 ;; Keywords followed by a type:
2370 (list (concat "\\<\\(extends\\|instanceof\\|new\\)\\>\\s *" 2368 (list (concat "\\<\\(extends\\|instanceof\\|new\\)\\>\\s *"
2371 java-font-lock-identifier-regexp) 2369 java-font-lock-identifier-regexp)
2372 '(2 (if (= (char-after (match-end 0)) ?.) 2370 '(2 (if (equal (char-after (match-end 0)) ?.)
2373 'font-lock-reference-face 'font-lock-type-face)) 2371 'font-lock-reference-face 'font-lock-type-face))
2374 (list (concat "\\=\\." java-font-lock-identifier-regexp) 2372 (list (concat "\\=\\." java-font-lock-identifier-regexp)
2375 '(goto-char (match-end 0)) nil 2373 '(goto-char (match-end 0)) nil
2376 '(1 (if (= (char-after (match-end 0)) ?.) 2374 '(1 (if (equal (char-after (match-end 0)) ?.)
2377 'font-lock-reference-face 'font-lock-type-face)))) 2375 'font-lock-reference-face 'font-lock-type-face))))
2378 2376
2379 ;; Keywords followed by a type list: 2377 ;; Keywords followed by a type list:
2380 (list (concat "\\<\\(implements\\|throws\\)\\>\\ s*" 2378 (list (concat "\\<\\(implements\\|throws\\)\\>\\ s*"
2381 java-font-lock-identifier-regexp) 2379 java-font-lock-identifier-regexp)
2382 '(2 (if (= (char-after (match-end 0)) ?.) 2380 '(2 (if (equal (char-after (match-end 0)) ?.)
2383 font-lock-reference-face font-lock-type-face)) 2381 font-lock-reference-face font-lock-type-face))
2384 (list (concat "\\=\\(\\.\\|\\s *\\(,\\)\\s *\\)" 2382 (list (concat "\\=\\(\\.\\|\\s *\\(,\\)\\s *\\)"
2385 java-font-lock-identifier-regexp) 2383 java-font-lock-identifier-regexp)
2386 '(goto-char (match-end 0)) nil 2384 '(goto-char (match-end 0)) nil
2387 '(3 (if (= (char-after (match-end 0)) ?.) 2385 '(3 (if (equal (char-after (match-end 0)) ?.)
2388 font-lock-reference-face font-lock-type-face)))) 2386 font-lock-reference-face font-lock-type-face))))
2389 2387
2390 ;; primitive types, can't be confused with anything else. 2388 ;; primitive types, can't be confused with anything else.
2391 (list java-font-lock-type-regexp 2389 (list java-font-lock-type-regexp
2392 '(1 font-lock-type-face) 2390 '(1 font-lock-type-face)
2458 1 'font-lock-variable-name-face t) 2456 1 'font-lock-variable-name-face t)
2459 2457
2460 ;; Doc tag - Exception types 2458 ;; Doc tag - Exception types
2461 (list (concat "@exception\\ s*" 2459 (list (concat "@exception\\ s*"
2462 java-font-lock-identifier-regexp) 2460 java-font-lock-identifier-regexp)
2463 '(1 (if (= (char-after (match-end 0)) ?.) 2461 '(1 (if (equal (char-after (match-end 0)) ?.)
2464 font-lock-reference-face font-lock-type-face) t) 2462 font-lock-reference-face font-lock-type-face) t)
2465 (list (concat "\\=\\." java-font-lock-identifier-regexp) 2463 (list (concat "\\=\\." java-font-lock-identifier-regexp)
2466 '(goto-char (match-end 0)) nil 2464 '(goto-char (match-end 0)) nil
2467 '(1 (if (= (char-after (match-end 0)) ?.) 2465 '(1 (if (equal (char-after (match-end 0)) ?.)
2468 'font-lock-reference-face 'font-lock-type-face) t))) 2466 'font-lock-reference-face 'font-lock-type-face) t)))
2469 2467
2470 ;; Doc tag - Cross-references, usually to methods 2468 ;; Doc tag - Cross-references, usually to methods
2471 '("@see\\s +\\(\\S *[^][ \t\n\r\f(){},.;:]\\)" 2469 '("@see\\s +\\(\\S *[^][ \t\n\r\f(){},.;:]\\)"
2472 1 font-lock-function-name-face t) 2470 1 font-lock-function-name-face t)