Initial Commit
[packages] / mule-packages / latin-euro-standards / latin-euro-latin10.el
1 ;;; latin-euro-latin10.el --- Define language environment
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-latin10.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-10 language environment, character set and coding
31 ;; system.
32
33 ;;; Code:
34
35 ;; define ISO-8859-16 for XEmacs 21.4 and earlier
36 ;;;###autoload
37 (unless (find-charset 'latin-iso8859-16)
38   ;; Create character set
39   (make-charset
40    'latin-iso8859-16 "ISO8859-16 (Latin 10)"
41    '(short-name "Latin-10"
42      long-name "ISO8859-16 (Latin 10)"
43      registry "iso8859-16"
44      dimension 1
45      columns 1
46      chars 96
47      final ?f                   ; octet 06/06; cf ISO-IR 226
48      graphic 1
49      direction l2r))
50   ;; For syntax of Latin-10 characters.
51   (loop for c from 64 to 127
52     do (modify-syntax-entry (make-char 'latin-iso8859-16 c) "w"))
53   (loop for c in '(#xA1 #xA2 #xA3 #xA6 #xA8 #xAA #xAC #xAE #xAF
54                    #xB3 #xB4 #xB5 #xB8 #xB9 #xBA #xBC #xBD #xBE #xBF)
55     do (modify-syntax-entry (make-char 'latin-iso8859-16 c) "w")))
56
57 ;;;###autoload
58 (unless (find-coding-system 'iso-8859-16)
59   ;; Create coding system. No need for a `safe-charsets' parameter, if an
60   ;; XEmacs can handle that, it has this coding system built in.
61   (make-coding-system
62    'iso-8859-16 'iso2022 "MIME ISO-8859-16"
63    '(charset-g0 ascii
64      charset-g1 latin-iso8859-16
65      charset-g2 t                       ; grrr
66      charset-g3 t                       ; grrr
67      mnemonic "MIME/Ltn-10")))
68
69 ;;;###autoload
70 (unless (assoc "Latin-10" language-info-alist)
71   (defun setup-latin10-environment ()
72     "Set up multilingual environment (MULE) for European Latin-10 users."
73     (interactive)
74     (set-language-environment "Latin-10"))
75
76   ;; sheesh, what we do for backward compatibility
77   (set-language-info-alist
78    "Latin-10"
79    `((charset ascii latin-iso8859-16)
80      (coding-system iso-8859-16)
81      (coding-priority iso-8859-16)
82      (input-method . "latin-10-prefix")
83      (sample-text .
84                   ;; #### OK, who knows some Romanian?
85                   ,(format "\
86 Hey, if you know Romanian, send sample encoded text (eg, using \"comma-below\"
87 characters) to xemacs-beta@xemacs.org.  Please use a MIME
88 application/octet-stream attachment if possible."
89                            ))
90      (documentation . "\
91 This is a generic language environment for Latin-10 (ISO-8859-16).  It
92 supports Romanian and most Western European languages."))
93    '("European")))
94
95 (provide 'latin-euro-latin10)
96
97 ;;; end of latin-euro-latin10.el