XEmacs 21.2.22 "Mercedes".
[chise/xemacs-chise.git.1] / lisp / font-lock.el
index 2918ef3..aba0a22 100644 (file)
@@ -4,7 +4,7 @@
 ;; Copyright (C) 1995 Amdahl Corporation.
 ;; Copyright (C) 1996 Ben Wing.
 
-;; Author: Jamie Zawinski <jwz@netscape.com>, for the LISPM Preservation Society.
+;; Author: Jamie Zawinski <jwz@jwz.org>, for the LISPM Preservation Society.
 ;; Minimally merged with FSF 19.34 by Barry Warsaw <bwarsaw@python.org>
 ;; Then (partially) synched with FSF 19.30, leading to:
 ;; Next Author: RMS
@@ -1536,7 +1536,12 @@ START should be at the beginning of a line."
 
 ;; If the buffer has just been reverted, normally that turns off
 ;; Font Lock mode.  So turn the mode back on if necessary.
-(defalias 'font-lock-revert-cleanup 'turn-on-font-lock)
+;; sb 1999-03-03 -- The above comment no longer appears to be operative as
+;; the first call to normal-mode *will* restore the font-lock state and
+;; this call forces a second font-locking to occur when reverting a buffer,
+;; which is wasteful at best.
+;(defalias 'font-lock-revert-cleanup 'turn-on-font-lock)
+(defun font-lock-revert-cleanup ())
 
 \f
 ;; Various functions.
@@ -2439,11 +2444,11 @@ The name is assumed to begin with a capital letter.")
                  (goto-char (match-end 1))
                  (goto-char (match-end 0))
                  (1 font-lock-variable-name-face))))))
-
+       
   ;; Modifier keywords and Java doc tags
   (setq java-font-lock-keywords-3
        (append
-
         '(
           ;; Feature scoping:
           ;; These must come first or the Modifiers from keywords-1 will
@@ -2453,11 +2458,11 @@ The name is assumed to begin with a capital letter.")
           ("\\<protected\\>" 0 font-lock-preprocessor-face)
           ("\\<public\\>"    0 font-lock-reference-face))
         java-font-lock-keywords-2
-
         (list
 
          ;; Java doc tags
-         '("@\\(author\\|exception\\|param\\|return\\|see\\|version\\)\\s "
+         '("@\\(author\\|exception\\|throws\\|deprecated\\|param\\|return\\|see\\|since\\|version\\)\\s "
            0 font-lock-keyword-face t)
 
          ;; Doc tag - Parameter identifiers
@@ -2465,7 +2470,17 @@ The name is assumed to begin with a capital letter.")
                1 'font-lock-variable-name-face t)
 
          ;; Doc tag - Exception types
-         (list (concat "@exception\\ s*"
+         (list (concat "@exception\\s +"
+                       java-font-lock-identifier-regexp)
+               '(1 (if (equal (char-after (match-end 0)) ?.)
+                       font-lock-reference-face font-lock-type-face) t)
+               (list (concat "\\=\\." java-font-lock-identifier-regexp)
+                     '(goto-char (match-end 0)) nil
+                     '(1 (if (equal (char-after (match-end 0)) ?.)
+                             'font-lock-reference-face 'font-lock-type-face) t)))
+    
+         ;; Doc tag - Exception types
+         (list (concat "@exception\\s +"
                        java-font-lock-identifier-regexp)
                '(1 (if (equal (char-after (match-end 0)) ?.)
                        font-lock-reference-face font-lock-type-face) t)
@@ -2477,7 +2492,14 @@ The name is assumed to begin with a capital letter.")
          ;; Doc tag - Cross-references, usually to methods 
          '("@see\\s +\\(\\S *[^][ \t\n\r\f(){},.;:]\\)"
            1 font-lock-function-name-face t)
-
+    
+         ;; Doc tag - Links
+         '("{@link\\s +\\([^}]*\\)}"
+           0 font-lock-keyword-face t)
+         ;; Doc tag - Links
+         '("{@link\\s +\\(\\S +\\s +\\S +\\)}"
+           1 font-lock-function-name-face t)
+    
          )))
   )