/[emacs]/emacs/lisp/language/european.el
ViewVC logotype

Diff of /emacs/lisp/language/european.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.71 by eliz, Tue Mar 5 18:54:18 2002 UTC revision 1.71.2.1 by miles, Fri Apr 4 06:20:26 2003 UTC
# Line 2  Line 2 
2    
3  ;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN.  ;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN.
4  ;; Licensed to the Free Software Foundation.  ;; Licensed to the Free Software Foundation.
5  ;; Copyright (C) 2001 Free Software Foundation, Inc.  ;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
6    
7  ;; Keywords: multilingual, European  ;; Keywords: multilingual, European
8    
# Line 32  Line 32 
32    
33  ;; Latin-1 (ISO-8859-1)  ;; Latin-1 (ISO-8859-1)
34    
 (make-coding-system  
  'iso-latin-1 2 ?1  
  "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."  
  '(ascii latin-iso8859-1 nil nil  
    nil nil nil nil nil nil nil nil nil nil nil nil t)  
  '((safe-charsets ascii latin-iso8859-1)  
    (mime-charset . iso-8859-1)))  
   
 (define-coding-system-alias 'iso-8859-1 'iso-latin-1)  
 (define-coding-system-alias 'latin-1 'iso-latin-1)  
   
35  (set-language-info-alist  (set-language-info-alist
36   "Latin-1" '((charset ascii latin-iso8859-1)   "Latin-1" '((charset ascii latin-iso8859-1)
37               (coding-system iso-latin-1)               (coding-system iso-latin-1)
# Line 64  character set which supports the followi Line 53  character set which supports the followi
53  We also have specific language environments for the following languages:  We also have specific language environments for the following languages:
54    For Dutch, \"Dutch\".    For Dutch, \"Dutch\".
55    For German, \"German\".    For German, \"German\".
   For Spanish, \"Spanish\".  
56    For French, \"French\".    For French, \"French\".
57      For Italian, \"Italian\".
58      For Slovenian, \"Slovenian\".
59      For Spanish, \"Spanish\".
60    
61  Latin-1 also covers several written languages outside Europe, including  Latin-1 also covers several written languages outside Europe, including
62  Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans."))  Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans."))
# Line 78  Indonesian/Malay, Tagalog (Philippines), Line 69  Indonesian/Malay, Tagalog (Philippines),
69   'iso-latin-2 2 ?2   'iso-latin-2 2 ?2
70   "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."   "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
71   '(ascii latin-iso8859-2 nil nil   '(ascii latin-iso8859-2 nil nil
72     nil nil nil nil nil nil nil)     nil nil nil nil nil nil nil nil nil nil nil t)
73   '((safe-charsets ascii latin-iso8859-2)   '((safe-charsets ascii latin-iso8859-2)
74     (mime-charset . iso-8859-2)))     (mime-charset . iso-8859-2)))
75    
# Line 101  character set which supports the followi Line 92  character set which supports the followi
92   and Swedish.   and Swedish.
93  We also have specific language environments for the following languages:  We also have specific language environments for the following languages:
94    For Czech, \"Czech\".    For Czech, \"Czech\".
95      For Croatian, \"Croatian\".
96    For Romanian, \"Romanian\".    For Romanian, \"Romanian\".
97    For Slovak, \"Slovak\"."))    For Slovak, \"Slovak\"."))
98   '("European"))   '("European"))
# Line 112  We also have specific language environme Line 104  We also have specific language environme
104   'iso-latin-3 2 ?3   'iso-latin-3 2 ?3
105   "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."   "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
106   '(ascii latin-iso8859-3 nil nil   '(ascii latin-iso8859-3 nil nil
107     nil nil nil nil nil nil nil)     nil nil nil nil nil nil nil nil nil nil nil t)
108   '((safe-charsets ascii latin-iso8859-3)   '((safe-charsets ascii latin-iso8859-3)
109     (mime-charset . iso-8859-3)))     (mime-charset . iso-8859-3)))
110    
# Line 140  These languages are supported with the L Line 132  These languages are supported with the L
132   'iso-latin-4 2 ?4   'iso-latin-4 2 ?4
133   "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."   "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
134   '(ascii latin-iso8859-4 nil nil   '(ascii latin-iso8859-4 nil nil
135     nil nil nil nil nil nil nil)     nil nil nil nil nil nil nil nil nil nil nil t)
136   '((safe-charsets ascii latin-iso8859-4)   '((safe-charsets ascii latin-iso8859-4)
137     (mime-charset . iso-8859-4)))     (mime-charset . iso-8859-4)))
138    
# Line 168  These languages are supported with the L Line 160  These languages are supported with the L
160   'iso-latin-5 2 ?9   'iso-latin-5 2 ?9
161   "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."   "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
162   '(ascii latin-iso8859-9 nil nil   '(ascii latin-iso8859-9 nil nil
163     nil nil nil nil nil nil nil)     nil nil nil nil nil nil nil nil nil nil nil t)
164   '((safe-charsets ascii latin-iso8859-9)   '((safe-charsets ascii latin-iso8859-9)
165     (mime-charset . iso-8859-9)))     (mime-charset . iso-8859-9)))
166    
# Line 194  These languages are supported with the L Line 186  These languages are supported with the L
186                                          ; for `Celtic' is taken.                                          ; for `Celtic' is taken.
187   "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."   "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
188   '(ascii latin-iso8859-14 nil nil   '(ascii latin-iso8859-14 nil nil
189     nil nil nil nil nil nil nil nil nil nil nil nil t)     nil nil nil nil nil nil nil nil nil nil nil t t)
190   '((safe-charsets ascii latin-iso8859-14)   '((safe-charsets ascii latin-iso8859-14)
191     (mime-charset . iso-8859-14)))     (mime-charset . iso-8859-14)))
192    
# Line 224  covered by other ISO-8859 character sets Line 216  covered by other ISO-8859 character sets
216   'iso-latin-9 2 ?0                      ; `0' for `Latin-0'   'iso-latin-9 2 ?0                      ; `0' for `Latin-0'
217   "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."   "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
218   '(ascii latin-iso8859-15 nil nil   '(ascii latin-iso8859-15 nil nil
219     nil nil nil nil nil nil nil nil nil nil nil nil t)     nil nil nil nil nil nil nil nil nil nil nil t t)
220   '((safe-charsets ascii latin-iso8859-15)   '((safe-charsets ascii latin-iso8859-15)
221     (mime-charset . iso-8859-15)))     (mime-charset . iso-8859-15)))
222    
# Line 250  Latin-9 is sometimes nicknamed `Latin-0' Line 242  Latin-9 is sometimes nicknamed `Latin-0'
242   '("European"))   '("European"))
243    
244  (set-language-info-alist  (set-language-info-alist
245     "Dutch" '((tutorial . "TUTORIAL.nl")
246               (charset ascii latin-iso8859-1)
247               (coding-system iso-latin-1 iso-latin-9)
248               (coding-priority iso-latin-1)
249               (nonascii-translation . latin-iso8859-1)
250               (unibyte-syntax . "latin-1")
251               (unibyte-display . iso-latin-1)
252               (input-method . "dutch")
253               (sample-text . "Er is een aantal manieren waarop je dit kan doen")
254               (documentation . "\
255    This language environment is almost the same as Latin-1,
256    but it selects the Dutch tutorial and input method."))
257     '("European"))
258    
259    (set-language-info-alist
260   "German" '((tutorial . "TUTORIAL.de")   "German" '((tutorial . "TUTORIAL.de")
261              (charset ascii latin-iso8859-1)              (charset ascii latin-iso8859-1)
262              (coding-system iso-latin-1)              (coding-system iso-latin-1 iso-latin-9)
263              (coding-priority iso-latin-1)              (coding-priority iso-latin-1)
264              (input-method . "german-postfix")              (input-method . "german-postfix")
265              (nonascii-translation . iso-latin-1)              (nonascii-translation . latin-iso8859-1)
266              (unibyte-syntax . "latin-1")              (unibyte-syntax . "latin-1")
267              (unibyte-display . iso-latin-1)              (unibyte-display . iso-latin-1)
268              (sample-text . "\              (sample-text . "\
# Line 270  Additionally, it selects the German tuto Line 277  Additionally, it selects the German tuto
277  (set-language-info-alist  (set-language-info-alist
278   "French" '((tutorial . "TUTORIAL.fr")   "French" '((tutorial . "TUTORIAL.fr")
279              (charset ascii latin-iso8859-1)              (charset ascii latin-iso8859-1)
280              (coding-system iso-latin-1)              (coding-system iso-latin-1 iso-latin-9)
281              (coding-priority iso-latin-1)              (coding-priority iso-latin-1)
282              (nonascii-translation . latin-iso8859-1)              (nonascii-translation . latin-iso8859-1)
283              (unibyte-syntax . "latin-1")              (unibyte-syntax . "latin-1")
# Line 279  Additionally, it selects the German tuto Line 286  Additionally, it selects the German tuto
286              (sample-text . "French (Fran,Ag(Bais)     Bonjour, Salut")              (sample-text . "French (Fran,Ag(Bais)     Bonjour, Salut")
287              (documentation . "\              (documentation . "\
288  This language environment is almost the same as Latin-1,  This language environment is almost the same as Latin-1,
289  but it selects the French tutorial."))  but it selects the French tutorial and input method."))
290     '("European"))
291    
292    (set-language-info-alist
293     "Italian" '((tutorial . "TUTORIAL.it")
294                (charset ascii latin-iso8859-1)
295                (coding-system iso-latin-1 iso-latin-9)
296                (coding-priority iso-latin-1)
297                (nonascii-translation . latin-iso8859-1)
298                (unibyte-syntax . "latin-1")
299                (unibyte-display . iso-latin-1)
300                (input-method . "italian-postfix")
301                (sample-text . "Salve, ciao!")
302                (documentation . "\
303    This language environment is almost the same as Latin-1,
304    but sets the default input method to \"italian-postfix\".
305    Additionally, it selects the Italian tutorial."))
306   '("European"))   '("European"))
307    
308  (set-language-info-alist  (set-language-info-alist
# Line 287  but it selects the French tutorial.")) Line 310  but it selects the French tutorial."))
310                (coding-system . (iso-8859-2))                (coding-system . (iso-8859-2))
311                (coding-priority . (iso-8859-2))                (coding-priority . (iso-8859-2))
312                (nonascii-translation . latin-iso8859-2)                (nonascii-translation . latin-iso8859-2)
313                (input-method . "latin-2-postfix")                (input-method . "slovenian")
314                (unibyte-syntax . "latin-2")                (unibyte-syntax . "latin-2")
315                (unibyte-display . iso-8859-2)                (unibyte-display . iso-8859-2)
316                (tutorial . "TUTORIAL.sl")                (tutorial . "TUTORIAL.sl")
317                (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!")                (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!")
318                (documentation . t))                (documentation . "\
319    This language environment is almost the same as Latin-2,
320    but it selects the Slovenian tutorial and input method."))
321   '("European"))   '("European"))
322    
323  (set-language-info-alist  (set-language-info-alist
324   "Spanish" '((tutorial . "TUTORIAL.es")   "Spanish" '((tutorial . "TUTORIAL.es")
325              (charset ascii latin-iso8859-1)              (charset ascii latin-iso8859-1)
326              (coding-system iso-latin-1)              (coding-system iso-latin-1 iso-latin-9)
327              (coding-priority iso-latin-1)              (coding-priority iso-latin-1)
328              (input-method . "spanish-postfix")              (input-method . "spanish-postfix")
329              (nonascii-translation . iso-latin-1)              (nonascii-translation . latin-iso8859-1)
330              (unibyte-syntax . "latin-1")              (unibyte-syntax . "latin-1")
331              (unibyte-display . iso-latin-1)              (unibyte-display . iso-latin-1)
332              (sample-text . "Spanish (Espa,Aq(Bol)     ,A!(BHola!")              (sample-text . "Spanish (Espa,Aq(Bol)     ,A!(BHola!")
# Line 311  but it sets the default input method to Line 336  but it sets the default input method to
336  and it selects the Spanish tutorial."))  and it selects the Spanish tutorial."))
337   '("European"))   '("European"))
338    
 (set-language-info-alist  
  "Dutch" '((tutorial . "TUTORIAL.nl")  
            (charset ascii latin-iso8859-1)  
            (coding-system iso-latin-1)  
            (coding-priority iso-latin-1)  
            (nonascii-translation . iso-latin-1)  
            (unibyte-syntax . "latin-1")  
            (unibyte-display . iso-latin-1)  
            (sample-text . "Er is een aantal manieren waarop je dit kan doen")  
            (documentation . "\  
 This language environment is almost the same as Latin-1,  
 but it selects the Dutch tutorial."))  
  '("European"))  
   
339  ;; For Turkish, the character set ISO-8859-9 (Latin-5) is used.  But,  ;; For Turkish, the character set ISO-8859-9 (Latin-5) is used.  But,
340  ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3)  ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3)
341  ;; was used for Turkish.  Those who use Latin-3 for Turkish should use  ;; was used for Turkish.  Those who use Latin-3 for Turkish should use
# Line 332  but it selects the Dutch tutorial.")) Line 343  but it selects the Dutch tutorial."))
343    
344  (set-language-info-alist  (set-language-info-alist
345   "Turkish" '((charset ascii latin-iso8859-9)   "Turkish" '((charset ascii latin-iso8859-9)
346               (coding-system iso-latin-5)               (coding-system iso-latin-5 iso-latin-3)
347               (coding-priority iso-latin-5)               (coding-priority iso-latin-5)
348               (nonascii-translation . latin-iso8859-9)               (nonascii-translation . latin-iso8859-9)
349               (unibyte-syntax . "latin-5")               (unibyte-syntax . "latin-5")
# Line 361  but it selects the Dutch tutorial.")) Line 372  but it selects the Dutch tutorial."))
372  (set-language-info-alist  (set-language-info-alist
373   "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based   "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based
374             (coding-priority utf-8 latin-8)             (coding-priority utf-8 latin-8)
375               (nonascii-translation . latin-iso8859-14)
376             (input-method . "welsh")             (input-method . "welsh")
377             (documentation . "Support for Welsh, using Unicode."))             (documentation . "Support for Welsh, using Unicode."))
378   '("European"))   '("European"))
379    
380  (set-language-info-alist  (set-language-info-alist
381     "Latin-6" `((coding-system latin-6)
382                 (coding-priority latin-6)
383                 (nonascii-translation . ,(get 'decode-iso-latin-6 'translation-table))
384                 (input-method . "latin-prefix")
385                 (features code-pages)
386                 (documentation . "Support for Latin-6."))
387     '("European"))
388    
389    (set-language-info-alist
390   "Latin-7" `((coding-system latin-7)   "Latin-7" `((coding-system latin-7)
391               (coding-priority latin-7)               (coding-priority latin-7)
392               ;; Fixme: input-method               (nonascii-translation . ,(get 'decode-iso-latin-7
393                                               'translation-table))
394                 (input-method . "latin-prefix")
395               (features code-pages)               (features code-pages)
396               (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian."))               (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian."))
397   '("European"))   '("European"))
# Line 377  but it selects the Dutch tutorial.")) Line 400  but it selects the Dutch tutorial."))
400   "Lithuanian" `((coding-system latin-7)   "Lithuanian" `((coding-system latin-7)
401                  (coding-priority latin-7)                  (coding-priority latin-7)
402                  (input-method . "lithuanian-keyboard")                  (input-method . "lithuanian-keyboard")
403                    (nonascii-translation . ,(get 'decode-iso-latin-7
404                                                  'translation-table))
405                  (features code-pages)                  (features code-pages)
406                  (documentation . "Support for Lithuanian."))                  (documentation . "Support for Lithuanian."))
407   '("European"))   '("European"))
# Line 385  but it selects the Dutch tutorial.")) Line 410  but it selects the Dutch tutorial."))
410   "Latvian" `((coding-system latin-7)   "Latvian" `((coding-system latin-7)
411               (coding-priority latin-7)               (coding-priority latin-7)
412               (input-method . "latvian-keyboard")               (input-method . "latvian-keyboard")
413                 (nonascii-translation . ,(get 'decode-iso-latin-7
414                                               'translation-table))
415               (features code-pages)               (features code-pages)
416               (documentation . "Support for Latvian."))               (documentation . "Support for Latvian."))
417   '("European"))   '("European"))
418    
419    (set-language-info-alist
420     "Swedish" '((tutorial . "TUTORIAL.sv")
421                (charset ascii latin-iso8859-1)
422                (coding-system iso-latin-1)
423                (coding-priority iso-latin-1)
424                (nonascii-translation . latin-iso8859-1)
425                (unibyte-syntax . "latin-1")
426                (unibyte-display . iso-latin-1)
427                (sample-text . "Goddag Hej")
428                (documentation . "Support for Swedish"))
429     '("European"))
430    
431    (set-language-info-alist
432     "Croatian" '((charset . (ascii latin-iso8859-2))
433                  (coding-system . (iso-8859-2))
434                  (coding-priority . (iso-8859-2))
435                  (input-method . "croatian")
436                  (nonascii-translation . latin-iso8859-2)
437                  (unibyte-syntax . "latin-2")
438                  (unibyte-display . iso-8859-2)
439                  (documentation . "Support for Croatian with Latin-2 encoding."))
440     '("European"))
441    
442  ;; Definitions for the Mac Roman character sets and coding system.  ;; Definitions for the Mac Roman character sets and coding system.
443  ;; The Mac Roman encoding uses all 128 code points in the range 128 to  ;; The Mac Roman encoding uses all 128 code points in the range 128 to
# Line 540  but it selects the Dutch tutorial.")) Line 590  but it selects the Dutch tutorial."))
590    (setq translation-table    (setq translation-table
591          (make-translation-table-from-vector encoding-vector))          (make-translation-table-from-vector encoding-vector))
592    (define-translation-table 'mac-roman-decoder translation-table)    (define-translation-table 'mac-roman-decoder translation-table)
593    (define-translation-table 'mac-roman-encoder    (define-translation-table 'mac-roman-encoder
594      (char-table-extra-slot translation-table 0)))      (char-table-extra-slot translation-table 0)))
595    
596  (define-ccl-program decode-mac-roman  (define-ccl-program decode-mac-roman
# Line 561  but it selects the Dutch tutorial.")) Line 611  but it selects the Dutch tutorial."))
611    `(1    `(1
612      ((loop      ((loop
613        (read-multibyte-character r0 r1)        (read-multibyte-character r0 r1)
614          (translate-character ucs-mule-to-mule-unicode r0 r1)
615        (translate-character mac-roman-encoder r0 r1)        (translate-character mac-roman-encoder r0 r1)
616          (if (r0 != ,(charset-id 'ascii))
617              (if (r0 != ,(charset-id 'eight-bit-graphic))
618                  (if (r0 != ,(charset-id 'eight-bit-control))
619                      (r1 = ??))))
620        (write-repeat r1))))        (write-repeat r1))))
621    "CCL program to encode Mac Roman")    "CCL program to encode Mac Roman")
622    
# Line 593  positions (integers or markers) specifyi Line 648  positions (integers or markers) specifyi
648        (compose-string string idx (match-end 0))        (compose-string string idx (match-end 0))
649        (setq idx (match-end 0))))        (setq idx (match-end 0))))
650    string)    string)
651          
652  (defun diacritic-compose-buffer ()  (defun diacritic-compose-buffer ()
653    "Compose diacritic characters in the current buffer."    "Compose diacritic characters in the current buffer."
654    (interactive)    (interactive)
# Line 609  The text matches the regular expression Line 664  The text matches the regular expression
664  Optional 4th argument STRING, if non-nil, is a string containing text  Optional 4th argument STRING, if non-nil, is a string containing text
665  to compose.  to compose.
666    
667  The return value is number of composed characters."  The return value is the number of composed characters."
668    (if (< (1+ from) to)    (when (< (1+ from) to)
669        (prog1 (- to from)        (if string
670          (if string            (compose-string string from to)
671              (compose-string string from to)          (compose-region from to))
672            (compose-region from to))        (- to from)))
         (- to from))))  
673    
674  ;; Register a function to compose Unicode diacrtics and marks.  ;; Register a function to compose Unicode diacrtics and marks.
675  (let ((patterns '(("\\C^\\c^+" . diacritic-composition-function))))  (let ((patterns '(("\\C^\\c^+" . diacritic-composition-function))))

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.71.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26