[Refdb-cvs] CVS: elisp ris.el,1.4,1.5
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2005-05-07 21:27:31
|
Update of /cvsroot/refdb/elisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3815 Modified Files: ris.el Log Message: added length checks Index: ris.el =================================================================== RCS file: /cvsroot/refdb/elisp/ris.el,v retrieving revision 1.4 retrieving revision 1.5 diff -u -U2 -r1.4 -r1.5 --- ris.el 7 May 2005 20:45:55 -0000 1.4 +++ ris.el 7 May 2005 21:27:22 -0000 1.5 @@ -57,4 +57,5 @@ ; prepare font-locking (make-face 'ris-main-face) +(make-face 'ris-main-ltd-face) (make-face 'ris-tag-face) (make-face 'ris-tyer-tag-face) @@ -64,4 +65,5 @@ (set-face-foreground 'ris-main-face "maroon") +(set-face-foreground 'ris-main-ltd-face "dark orchid") (set-face-foreground 'ris-tag-face "blue") (set-face-foreground 'ris-tyer-tag-face "red") @@ -73,9 +75,23 @@ (defvar ris-font-lock-keywords '( +;; three possible values. ON REQUEST must be followed by a date in MM/DD/YY notation ("^RP - \\(\\(IN FILE$\\)\\|\\(NOT IN FILE$\\)\\|\\(ON REQUEST [0-1][0-9]/[0-3][0-9]/[0-9][0-9]\\)\\)" 1 'ris-reprint-face t) - ("^\\(PY\\|Y1\\|Y2\\) - \\([0-9][0-9][0-9][0-9]/\\([0-1][0-9]\\)?/\\([0-3][0-9]\\)?/.*\\)" 2 'ris-pubyear-face t) + +;; YYYY/MM/DD/othertext, with MM,DD, and othertext optional. The slashes must still be present. Othertext may not exceed 255 chars + ("^\\(PY\\|Y1\\|Y2\\) - \\([0-9][0-9][0-9][0-9]/\\([0-1][0-9]\\)?/\\([0-3][0-9]\\)?/.\\{0,255\\}\\)" 2 'ris-pubyear-face t) + +;; corporate authors do not use a comma. Other authors may use up to two commas, the first to separate first and middle names from the last name, the second to separate an optional suffix. Currently no length checking is implemented ("^\\(AU\\|A1\\|A2\\|A3\\|ED\\) - \\(\\([^,\n]+,[^,\n]+\\(,[^,\n]+\\)?$\\)\\|\\([^,\n]+$\\)\\)" 2 'ris-author-face t) - ("^\\(ID\\|T1\\|TI\\|CT\\|BT\\|N1\\|AB\\|KW\\|SP\\|EP\\|JF\\|JO\\|JA\\|J1\\|J2\\|VL\\|T2\\|IS\\|CP\\|CY\\|PB\\|U1\\|U2\\|U3\\|U4\\|U5\\|T3\\|N2\\|SN\\|AV\\|M1\\|M2\\|M3\\|AD\\|UR\\) - \\(.+\\)" 2 'ris-main-face t) + +;; fields with a limited length of up to 255 chars + ("^\\(ID\\|KW\\|SP\\|EP\\|JF\\|JO\\|JA\\|J1\\|J2\\|VL\\|IS\\|CP\\|CY\\|PB\\|U1\\|U2\\|U3\\|U4\\|U5\\|SN\\|AV\\|M1\\|M2\\|M3\\|UR\\) - \\(.\\{1,255\\}\\)" 2 'ris-main-ltd-face t) + +;; fields with unlimited length + ("^\\(T1\\|TI\\|CT\\|BT\\|N1\\|AB\\|T2\\|T3\\|N2\\|AD\\) - \\(.+\\)" 2 'ris-main-face t) + +;; all valid tags except TY and ER ("^\\(\\(ID\\|T1\\|TI\\|CT\\|BT\\|A1\\|AU\\|Y1\\|PY\\|N1\\|AB\\|KW\\|RP\\|SP\\|EP\\|JF\\|JO\\|JA\\|J1\\|J2\\|VL\\|T2\\|A2\\|ED\\|IS\\|CP\\|CY\\|PB\\|U1\\|U2\\|U3\\|U4\\|U5\\|T3\\|A3\\|N2\\|SN\\|AV\\|Y2\\|M1\\|M2\\|M3\\|AD\\|UR\\) - \\)\\(.+\\)" 1 'ris-tag-face t) + +;; all valid types and the end tag ("^\\(TY - \\(ABST\\|ADVS\\|ART\\|BILL\\|BOOK\\|CASE\\|CHAP\\|COMP\\|CONF\\|CTLG\\|DATA\\|ELEC\\|GEN\\|HEAR\\|ICOMM\\|INPR\\|JFULL\\|JOUR\\|MAP\\|MGZN\\|MPCT\\|MUSIC\\|NEWS\\|PAMP\\|PAT\\|PCOMM\\|RPRT\\|SER\\|SLIDE\\|SOUND\\|STAT\\|THES\\|UNBILL\\|UNPB\\|VIDEO\\)\\)$\\|^\\(ER - \\)$" 0 'ris-tyer-tag-face t)) "Keyword highlighting specification for `ris-mode'.") |