Mercurial > hg > xemacs-beta
changeset 2765:4ee3cf8de81d
[xemacs-hg @ 2005-05-10 17:02:52 by aidan]
Add full syntax info for 8859-14, -15, -16
author | aidan |
---|---|
date | Tue, 10 May 2005 17:03:00 +0000 |
parents | 5ea65b8a540f |
children | 4b800e9aaadd |
files | lisp/ChangeLog lisp/mule/european.el lisp/mule/latin.el |
diffstat | 3 files changed, 208 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon May 09 21:51:20 2005 +0000 +++ b/lisp/ChangeLog Tue May 10 17:03:00 2005 +0000 @@ -1,3 +1,10 @@ +2005-05-10 Aidan Kehoe <kehoea@parhasard.net> + + * mule/european.el: + * mule/latin.el: + Add full syntax table and case mapping information for + iso-8859-14, iso-8859-15, iso-8859-16. + 2005-05-05 Aidan Kehoe <kehoea@parhasard.net> * mule/mule-ccl.el (define-ccl-program): Spelling and grammar fix
--- a/lisp/mule/european.el Mon May 09 21:51:20 2005 +0000 +++ b/lisp/mule/european.el Tue May 10 17:03:00 2005 +0000 @@ -145,34 +145,79 @@ long-name "RHP of Latin-10 (ISO 8859-16)" )) -(loop for c from 64 to 127 +;; Latin-1 is dealt with in iso8859-1.el, which see. + +;; ISO 8859-14. +;; +;; Initialise all characters to word syntax. +(loop for c from #xa0 to #xff + do (modify-syntax-entry (make-char 'latin-iso8859-14 c) "w")) + +;; Now, the exceptions. There's just punctuation in this character set. +(dolist (code '(#xa0 ;; NO BREAK SPACE + #xa3 ;; POUND SIGN + #xa7 ;; SECTION SIGN + #xa9 ;; COPYRIGHT + #xad ;; SOFT HYPHEN + #xae ;; REGISTERED + #xb6)) ;; PILCROW SIGN + (modify-syntax-entry (make-char 'latin-iso8859-14 code) "_")) +;; end of ISO 8859-14. + +;; ISO 8859-16. +;; +;; Initialise all of iso-8859-16 to word syntax. +(loop for c from #xa0 to #xff do (modify-syntax-entry (make-char 'latin-iso8859-16 c) "w")) -(mapc (lambda (c) - (modify-syntax-entry (make-char 'latin-iso8859-16 c) "w")) - '(#xA1 #xA2 #xA3 #xA6 #xA8 #xAA #xAC #xAE #xAF - #xB3 #xB4 #xB5 #xB8 #xB9 #xBA #xBC #xBD #xBE #xBF)) - -;; For syntax of Latin-1 characters. -(loop for c from 64 to 127 ; from ',A@(B' to ',A(B' - do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w")) +;; And then do the exceptions. First, the punctuation (following the model +;; of Latin-1): +(dolist (code '(#xa0 ;; NO BREAK SPACE + #xa4 ;; EURO SIGN + #xa7 ;; SECTION SIGN + #xa9 ;; COPYRIGHT + #xad ;; SOFT HYPHEN + #xb0 ;; DEGREE + #xb1 ;; PLUS-MINUS SIGN + #xb6 ;; PILCROW SIGN + #xb7)) ;; MIDDLE DOT + (modify-syntax-entry (make-char 'latin-iso8859-16 code) "_")) + +;; Mark the DOUBLE LOW-9 QUOTATION MARK and its closing character as +;; quotation marks. +(modify-syntax-entry (make-char 'latin-iso8859-16 #xa5) "\"") +(modify-syntax-entry (make-char 'latin-iso8859-16 #xb5) "\"") -(modify-syntax-entry (make-char 'latin-iso8859-1 32) "w") ; no-break space -(modify-syntax-entry ?,AW(B "_") -(modify-syntax-entry ?,Aw(B "_") +;; For some crazy reason--well, in truth, probably because Jamie never used +;; them in anger--the guillemets have open- and close-parenthesis syntax in +;; Latin 1. We will probably change that in the future; for the moment, I'm +;; preserving it. +(modify-syntax-entry (make-char 'latin-iso8859-16 #xab) + (format "(%c" (make-char 'latin-iso8859-16 #xbb))) +(modify-syntax-entry (make-char 'latin-iso8859-16 #xbb) + (format ")%c" (make-char 'latin-iso8859-16 #xab))) + +;; end of ISO 8859-16. -;; For syntax of Latin-9 characters. -;; Based on Latin-1 and differences from Jukka Korpela -;; http://www.cs.tut.fi/~jkorpela/latin9.html +;; ISO 8859-15. +;; +;; Based on Latin-1 and differences therefrom. +;; +;; First, initialise the syntax from the corresponding Latin-1 characters. +(loop for c from #xa0 to #xff + do (modify-syntax-entry + (make-char 'latin-iso8859-15 c) + (string (char-syntax (make-char 'latin-iso8859-1 c))))) +;; Now, the exceptions (loop for c in '(?,b&(B ?,b((B ?,b4(B ?,b8(B ?,b<(B ?,b=(B ?,b>(B) do (modify-syntax-entry c "w")) -(loop for c from 64 to 127 ; from ',b@(B' to ',b(B' - do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w")) - -(modify-syntax-entry (make-char 'latin-iso8859-15 32) "w") ; no-break space -(modify-syntax-entry ?,bW(B "_") -(modify-syntax-entry ?,bw(B "_") +;; Again, perpetuating insanity with the guillemets. +(modify-syntax-entry (make-char 'latin-iso8859-16 #xab) + (format "(%c" (make-char 'latin-iso8859-16 #xbb))) +(modify-syntax-entry (make-char 'latin-iso8859-16 #xbb) + (format ")%c" (make-char 'latin-iso8859-16 #xab))) +;; end of ISO 8859-15. ;; For syntax of Latin-2 (loop for c in '(?,B!(B ?,B#(B ?,B%(B ?,B&(B ?,B)(B ?,B*(B ?,B+(B ?,B,(B ?,B.(B ?,B/(B ?,B1(B ?,B3(B ?,B5(B ?,B6(B ?,B9(B ?,B:(B ?,B;(B ?,B<(B)
--- a/lisp/mule/latin.el Mon May 09 21:51:20 2005 +0000 +++ b/lisp/mule/latin.el Tue May 10 17:03:00 2005 +0000 @@ -1,6 +1,6 @@ ;;; latin.el --- Support for Latin charsets. -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2005 Free Software Foundation, Inc. ;; Author: Hrvoje Niksic <hniksic@xemacs.org> ;; Maintainer: XEmacs Development Team @@ -242,6 +242,140 @@ ; (220 252) ;latin letter u with diaeresis ; (222 254) ;latin letter s with cedilla ; )) + +;; Latin 9. +(setup-case-pairs + 'latin-iso8859-15 + '((166 168) ;latin letter s with caron * + (180 184) ;latin letter z with caron * + (188 189) ;latin ligature oe * + (190 255) ;latin letter y with diaeresis * + (192 224) ;latin letter a with grave + (193 225) ;latin letter a with acute + (194 226) ;latin letter a with circumflex + (195 227) ;latin letter a with tilde + (196 228) ;latin letter a with diaeresis + (197 229) ;latin letter a with ring above + (198 230) ;latin letter ae + (199 231) ;latin letter c with cedilla + (200 232) ;latin letter e with grave + (201 233) ;latin letter e with acute + (202 234) ;latin letter e with circumflex + (203 235) ;latin letter e with diaeresis + (204 236) ;latin letter i with grave + (205 237) ;latin letter i with acute + (206 238) ;latin letter i with circumflex + (207 239) ;latin letter i with diaeresis + (208 240) ;latin letter eth + (209 241) ;latin letter n with tilde + (210 242) ;latin letter o with grave + (211 243) ;latin letter o with acute + (212 244) ;latin letter o with circumflex + (213 245) ;latin letter o with tilde + (214 246) ;latin letter o with diaeresis + (216 248) ;latin letter o with stroke + (217 249) ;latin letter u with grave + (218 250) ;latin letter u with acute + (219 251) ;latin letter u with circumflex + (220 252) ;latin letter u with diaeresis + (221 253) ;latin letter y with acute + (222 254) ;latin letter thorn + )) + +;; ISO 8859-14, not in FSF, our mapping. +(setup-case-pairs + 'latin-iso8859-14 + '((161 162) ;latin letter b with dot above + (164 165) ;latin letter c with dot above + (166 171) ;latin letter d with dot above + (168 184) ;latin letter w with grave + (170 186) ;latin letter w with acute + (172 188) ;latin letter y with grave + (175 255) ;latin letter y with diaeresis + (176 177) ;latin letter f with dot above + (178 179) ;latin letter g with dot above + (180 181) ;latin letter m with dot above + (183 185) ;latin letter p with dot above + (187 191) ;latin letter s with dot above + (189 190) ;latin letter w with diaeresis + (192 224) ;latin letter a with grave + (193 225) ;latin letter a with acute + (194 226) ;latin letter a with circumflex + (195 227) ;latin letter a with tilde + (196 228) ;latin letter a with diaeresis + (197 229) ;latin letter a with ring above + (198 230) ;latin letter ae + (199 231) ;latin letter c with cedilla + (200 232) ;latin letter e with grave + (201 233) ;latin letter e with acute + (202 234) ;latin letter e with circumflex + (203 235) ;latin letter e with diaeresis + (204 236) ;latin letter i with grave + (205 237) ;latin letter i with acute + (206 238) ;latin letter i with circumflex + (207 239) ;latin letter i with diaeresis + (208 240) ;latin letter w with circumflex + (209 241) ;latin letter n with tilde + (210 242) ;latin letter o with grave + (211 243) ;latin letter o with acute + (212 244) ;latin letter o with circumflex + (213 245) ;latin letter o with tilde + (214 246) ;latin letter o with diaeresis + (215 247) ;latin letter t with dot above + (216 248) ;latin letter o with stroke + (217 249) ;latin letter u with grave + (218 250) ;latin letter u with acute + (219 251) ;latin letter u with circumflex + (220 252) ;latin letter u with diaeresis + (221 253) ;latin letter y with acute + (222 254) ;latin letter y with circumflex + )) + +;; ISO 8859-16, not in FSF, our mapping. +(setup-case-pairs + 'latin-iso8859-16 + '((161 162) ;latin letter a with ogonek + (163 179) ;latin letter l with stroke + (166 168) ;latin letter s with caron + (170 186) ;latin letter s with comma below + (172 174) ;latin letter z with acute + (175 191) ;latin letter z with dot above + (178 185) ;latin letter c with caron + (180 184) ;latin letter z with caron + (190 255) ;latin letter y with diaeresis + (192 224) ;latin letter a with grave + (193 225) ;latin letter a with acute + (194 226) ;latin letter a with circumflex + (195 227) ;latin letter a with breve + (196 228) ;latin letter a with diaeresis + (197 229) ;latin letter c with acute + (198 230) ;latin letter ae + (199 231) ;latin letter c with cedilla + (200 232) ;latin letter e with grave + (201 233) ;latin letter e with acute + (202 234) ;latin letter e with circumflex + (203 235) ;latin letter e with diaeresis + (204 236) ;latin letter i with grave + (205 237) ;latin letter i with acute + (206 238) ;latin letter i with circumflex + (207 239) ;latin letter i with diaeresis + (208 240) ;latin letter d with stroke + (209 241) ;latin letter n with acute + (210 242) ;latin letter o with grave + (211 243) ;latin letter o with acute + (212 244) ;latin letter o with circumflex + (213 245) ;latin letter o with double acute + (214 246) ;latin letter o with diaeresis + (215 247) ;latin letter s with acute + (216 248) ;latin letter u with double acute + (217 249) ;latin letter u with grave + (218 250) ;latin letter u with acute + (219 251) ;latin letter u with circumflex + (220 252) ;latin letter u with diaeresis + (221 253) ;latin letter e with ogonek + (222 254) ;latin letter t with comma below + )) + ;; This is our utility function; we don't want it in the dumped XEmacs.