Mercurial > hg > xemacs-beta
comparison lisp/font-lock.el @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | 697ef44129c6 |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
2442 '(0 nil)) ; Workaround for bug in XEmacs. | 2442 '(0 nil)) ; Workaround for bug in XEmacs. |
2443 '(font-lock-match-java-declarations | 2443 '(font-lock-match-java-declarations |
2444 (goto-char (match-end 1)) | 2444 (goto-char (match-end 1)) |
2445 (goto-char (match-end 0)) | 2445 (goto-char (match-end 0)) |
2446 (1 font-lock-variable-name-face)))))) | 2446 (1 font-lock-variable-name-face)))))) |
2447 | 2447 |
2448 ;; Modifier keywords and Java doc tags | 2448 ;; Modifier keywords and Java doc tags |
2449 (setq java-font-lock-keywords-3 | 2449 (setq java-font-lock-keywords-3 |
2450 (append | 2450 (append |
2451 | 2451 |
2452 '( | 2452 '( |
2453 ;; Feature scoping: | 2453 ;; Feature scoping: |
2454 ;; These must come first or the Modifiers from keywords-1 will | 2454 ;; These must come first or the Modifiers from keywords-1 will |
2455 ;; catch them. We don't want to use override fontification here | 2455 ;; catch them. We don't want to use override fontification here |
2456 ;; because then these terms will be fontified within comments. | 2456 ;; because then these terms will be fontified within comments. |
2457 ("\\<private\\>" 0 font-lock-string-face) | 2457 ("\\<private\\>" 0 font-lock-string-face) |
2458 ("\\<protected\\>" 0 font-lock-preprocessor-face) | 2458 ("\\<protected\\>" 0 font-lock-preprocessor-face) |
2459 ("\\<public\\>" 0 font-lock-reference-face)) | 2459 ("\\<public\\>" 0 font-lock-reference-face)) |
2460 java-font-lock-keywords-2 | 2460 java-font-lock-keywords-2 |
2461 | 2461 |
2462 (list | 2462 (list |
2463 | 2463 |
2464 ;; Java doc tags | 2464 ;; Java doc tags |
2465 '("@\\(author\\|exception\\|param\\|return\\|see\\|version\\)\\s " | 2465 '("@\\(author\\|exception\\|throws\\|deprecated\\|param\\|return\\|see\\|since\\|version\\)\\s " |
2466 0 font-lock-keyword-face t) | 2466 0 font-lock-keyword-face t) |
2467 | 2467 |
2468 ;; Doc tag - Parameter identifiers | 2468 ;; Doc tag - Parameter identifiers |
2469 (list (concat "@param\\s +" java-font-lock-identifier-regexp) | 2469 (list (concat "@param\\s +" java-font-lock-identifier-regexp) |
2470 1 'font-lock-variable-name-face t) | 2470 1 'font-lock-variable-name-face t) |
2471 | 2471 |
2472 ;; Doc tag - Exception types | 2472 ;; Doc tag - Exception types |
2473 (list (concat "@exception\\ s*" | 2473 (list (concat "@exception\\s +" |
2474 java-font-lock-identifier-regexp) | 2474 java-font-lock-identifier-regexp) |
2475 '(1 (if (equal (char-after (match-end 0)) ?.) | 2475 '(1 (if (equal (char-after (match-end 0)) ?.) |
2476 font-lock-reference-face font-lock-type-face) t) | 2476 font-lock-reference-face font-lock-type-face) t) |
2477 (list (concat "\\=\\." java-font-lock-identifier-regexp) | 2477 (list (concat "\\=\\." java-font-lock-identifier-regexp) |
2478 '(goto-char (match-end 0)) nil | 2478 '(goto-char (match-end 0)) nil |
2479 '(1 (if (equal (char-after (match-end 0)) ?.) | 2479 '(1 (if (equal (char-after (match-end 0)) ?.) |
2480 'font-lock-reference-face 'font-lock-type-face) t))) | 2480 'font-lock-reference-face 'font-lock-type-face) t))) |
2481 | |
2482 ;; Doc tag - Exception types | |
2483 (list (concat "@exception\\s +" | |
2484 java-font-lock-identifier-regexp) | |
2485 '(1 (if (equal (char-after (match-end 0)) ?.) | |
2486 font-lock-reference-face font-lock-type-face) t) | |
2487 (list (concat "\\=\\." java-font-lock-identifier-regexp) | |
2488 '(goto-char (match-end 0)) nil | |
2489 '(1 (if (equal (char-after (match-end 0)) ?.) | |
2490 'font-lock-reference-face 'font-lock-type-face) t))) | |
2481 | 2491 |
2482 ;; Doc tag - Cross-references, usually to methods | 2492 ;; Doc tag - Cross-references, usually to methods |
2483 '("@see\\s +\\(\\S *[^][ \t\n\r\f(){},.;:]\\)" | 2493 '("@see\\s +\\(\\S *[^][ \t\n\r\f(){},.;:]\\)" |
2484 1 font-lock-function-name-face t) | 2494 1 font-lock-function-name-face t) |
2485 | 2495 |
2496 ;; Doc tag - Links | |
2497 '("{@link\\s +\\([^}]*\\)}" | |
2498 0 font-lock-keyword-face t) | |
2499 ;; Doc tag - Links | |
2500 '("{@link\\s +\\(\\S +\\s +\\S +\\)}" | |
2501 1 font-lock-function-name-face t) | |
2502 | |
2486 ))) | 2503 ))) |
2487 ) | 2504 ) |
2488 | 2505 |
2489 (defvar java-font-lock-keywords java-font-lock-keywords-1 | 2506 (defvar java-font-lock-keywords java-font-lock-keywords-1 |
2490 "Additional expressions to highlight in Java mode.") | 2507 "Additional expressions to highlight in Java mode.") |