Remove non-free old and crusty clearcase pkg
[packages] / mule-packages / latin-euro-standards / latin-euro-latin8.el
1 ;;; latin-euro-latin8.el --- Define language environment -*- coding: iso-2022-8 -*-
2
3 ;; Copyright (C) 2002 Free Software Foundation, Inc
4
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
9
10 ;; This file is part of XEmacs.
11
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)
15 ;; any later version.
16
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.
21
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.
26
27
28 ;;; Commentary:
29
30 ;; Provides the latin-8 language environment, character set and coding
31 ;; system.
32
33 ;;; Code:
34
35 ;;;###autoload
36 (defvar latin-euro-recognize-safe-charsets
37   (condition-case nil
38       (progn
39         (coding-system-property (find-coding-system 'iso-8859-1-unix)
40                                 'safe-charsets)
41         t)
42     (error nil))
43   "t if this XEmacs understands the `safe-charsets' coding-system property.")
44
45 ;;;###autoload
46 (unless (find-charset 'latin-iso8859-14)
47   ;; Create character set
48   (make-charset
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)"
53      registry "iso8859-14"
54      dimension 1
55      columns 1
56      chars 96
57      final ?_                   ; octet 05/15; cf ISO-IR 199
58      graphic 1
59      direction l2r))
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) "_")))
64
65 ;;;###autoload
66 (unless (find-coding-system 'iso-8859-14)
67   ;; Create coding system
68   (make-coding-system
69    'iso-8859-14 'iso2022 "MIME ISO-8859-14"
70    `(charset-g0 ascii
71      charset-g1 latin-iso8859-14
72      charset-g2 t                       ; grrr
73      charset-g3 t                       ; grrr
74      mnemonic "MIME/Ltn-8"
75      ,@(if latin-euro-recognize-safe-charsets
76            '(safe-charsets (ascii control-1 latin-iso8859-14))))))
77
78 ;;;###autoload
79 (unless (assoc "Latin-8" language-info-alist)
80   (defun setup-latin8-environment ()
81     "Set up multilingual environment (MULE) for European Latin-8 users."
82     (interactive)
83     (set-language-environment "Latin-8"))
84
85   (set-language-info-alist
86    "Latin-8"
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\":
95
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. \"
103
104 * scl%cip
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))))
109      (documentation . "\
110 This is a generic language environment for Latin-8 (ISO-8859-14).  It
111 supports Celtic and most Western European languages."))
112    '("European")))
113
114 (provide 'latin-euro-latin8)
115
116 ;; The above sample text format string was generated using this code and the
117 ;; text following it; 
118 ;; 
119 ;; (let ((res ()))
120 ;;   (while (re-search-forward 
121 ;;        (format "[%c-%c]" 
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"))
126 ;;   (nreverse res))
127 ;; 
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\":
131 ;; 
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
139 ;; 
140 ;; * scl\e-_éip\e-A
141 ;; ** eachtra\e-_í\e-A
142 ;; "
143
144 ;;; end of latin-euro-latin8.el