1 ;;; latin-euro-latin8.el --- Define language environment -*- coding: iso-2022-8 -*-
3 ;; Copyright (C) 2002 Free Software Foundation, Inc
5 ;; Author: Stephen J. Turnbull
6 ;; Keywords: mule, charsets
7 ;; Created: 2002 October 24 (as latin-unity-latin8.el)
8 ;; Last-modified: 2005 February 7
10 ;; This file is part of XEmacs.
12 ;; XEmacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; XEmacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with XEmacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
30 ;; Provides the latin-8 language environment, character set and coding
36 (defvar latin-euro-recognize-safe-charsets
39 (coding-system-property (find-coding-system 'iso-8859-1-unix)
43 "t if this XEmacs understands the `safe-charsets' coding-system property.")
46 (unless (find-charset 'latin-iso8859-14)
47 ;; Create character set
49 'latin-iso8859-14 "ISO8859-14 (Latin 8)"
50 ;; sheesh, what we do for backward compatibility
51 '(short-name "Latin-8"
52 long-name "ISO8859-16 (Latin 8)"
57 final ?_ ; octet 05/15; cf ISO-IR 199
60 (loop for c from 32 to 127
61 do (modify-syntax-entry (make-char 'latin-iso8859-14 c) "w"))
62 (loop for c in '(#xA3 #xA7 #xA9 #xAD #xAE #xB6)
63 do (modify-syntax-entry (make-char 'latin-iso8859-14 c) "_")))
66 (unless (find-coding-system 'iso-8859-14)
67 ;; Create coding system
69 'iso-8859-14 'iso2022 "MIME ISO-8859-14"
71 charset-g1 latin-iso8859-14
75 ,@(if latin-euro-recognize-safe-charsets
76 '(safe-charsets (ascii control-1 latin-iso8859-14))))))
79 (unless (assoc "Latin-8" language-info-alist)
80 (defun setup-latin8-environment ()
81 "Set up multilingual environment (MULE) for European Latin-8 users."
83 (set-language-environment "Latin-8"))
85 (set-language-info-alist
87 `((charset ascii latin-iso8859-14)
88 (coding-system iso-8859-14)
89 (coding-priority iso-8859-14)
90 (input-method . "latin-8-prefix")
91 (sample-text . ,(apply 'format "\
92 Following is the first paragraph of Myles na gCopaleen's An B%cal Bocht, %c
93 Eibhl%cn N%c Nuall%cin, 1941, 1999. The first asterisked word is a rendering
94 of \"diversions\" in Irish orthography, and the second \"adventures\":
96 \"T%c na nithe at%c luaithe agam sa scr%cbhinn seo %c gcur agam ann de %cr%c go
97 %cfuil an saol eile ag druidim liom go sciobtha -- i %cfad uainn go l%cir an
98 drochrud agus n%cr aithn%c an t-ainspiorad mar %cr%cthair m%c -- agus f%cs 'mar
99 n%c beidh %cr leith%cid%c ar%cs ann.' Is c%cir cu%c go gcuirf%c ar f%cil don %cuintir
100 a leanann sinn faisn%cis %cigin ar na dibheairseans* agus na haidbhintiurs** a
101 bh%c ann len%cr linn mar nach mbeidh %cr sampla%c ar%cs ann go br%cch agus mar
102 nach mbeidh aon saol úd againne nach %cfuil anois ann. \"
105 ** eachtra%c" (mapcar #'(lambda (code) (make-char 'latin-iso8859-14 code))
106 '(105 41 109 109 97 97 97 109 97 34 109 34 34 105 97
107 109 34 97 105 115 97 97 105 109 109 115 109 109 97
108 53 105 105 109 97 97 109 109 97 34 105 109))))
110 This is a generic language environment for Latin-8 (ISO-8859-14). It
111 supports Celtic and most Western European languages."))
114 (provide 'latin-euro-latin8)
116 ;; The above sample text format string was generated using this code and the
117 ;; text following it;
120 ;; (while (re-search-forward
122 ;; (make-char 'latin-iso8859-14 32)
123 ;; (make-char 'latin-iso8859-14 127)) nil t)
124 ;; (push (cadr (split-char (elt (match-string 0) 0))) res)
125 ;; (replace-match "%c"))
128 ;; "Following is the first paragraph of Myles na gCopaleen's An B
\e-_éal Bocht, ©
\e-A
129 ;; Eibhl
\e-_ín Ní Nualláin, 1941, 1999. The first asterisked word is a rendering
\e-A
130 ;; of \"diversions\" in Irish orthography, and the second \"adventures\":
132 ;; \"T
\e-_á na nithe atá luaithe agam sa scríbhinn seo á gcur agam ann de ¢rí go
\e-A
133 ;;
\e-_¢fuil an saol eile ag druidim liom go sciobtha -- i ¢fad uainn go léir an
\e-A
134 ;; drochrud agus n
\e-_ár aithní an t-ainspiorad mar ¢ráthair mé -- agus fós 'mar
\e-A
135 ;; n
\e-_á beidh ár leithéidí arís ann.' Is cóir cuí go gcuirfí ar fáil don µuintir
\e-A
136 ;; a leanann sinn faisn
\e-_éis éigin ar na dibheairseans* agus na haidbhintiurs** a
\e-A
137 ;; bh
\e-_í ann lenár linn mar nach mbeidh ár samplaí arís ann go brách agus mar
\e-A
138 ;; nach mbeidh aon saol úd againne nach
\e-_¢fuil anois ann. \"
\e-A
141 ;; ** eachtra
\e-_í
\e-A
144 ;;; end of latin-euro-latin8.el