diff options
author | Jim Blandy <jimb@redhat.com> | 1992-03-16 20:39:05 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-03-16 20:39:05 +0000 |
commit | 18806e8f99c254f8f7980ce593dc1532d8ff3373 (patch) | |
tree | 54abb83712731e3d3b08a5083067d34b912a8fae /lisp/international | |
parent | 4014fbdecd00bae7501472497fb60473b4b3bf57 (diff) | |
download | emacs-18806e8f99c254f8f7980ce593dc1532d8ff3373.tar.gz |
Initial revision
Diffstat (limited to 'lisp/international')
-rw-r--r-- | lisp/international/iso-ascii.el | 126 | ||||
-rw-r--r-- | lisp/international/iso-insert.el | 620 | ||||
-rw-r--r-- | lisp/international/iso-swed.el | 140 | ||||
-rw-r--r-- | lisp/international/swedish.el | 145 |
4 files changed, 1031 insertions, 0 deletions
diff --git a/lisp/international/iso-ascii.el b/lisp/international/iso-ascii.el new file mode 100644 index 00000000000..13aeaaa8c76 --- /dev/null +++ b/lisp/international/iso-ascii.el @@ -0,0 +1,126 @@ +;; Set up char tables for ISO 8859/1 character set for ASCII terminals. +;; Copyright (C) 1987 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 1, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +;; Written by Howard Gayle. See display-table.el for details. + +;; This code sets up to display ISO 8859/1 characters on plain +;; ASCII terminals. The display strings for the characters are +;; more-or-less based on TeX. + +(require 'disp-table) + +(standard-display-ascii 160 "{_}") ; NBSP (no-break space) +(standard-display-ascii 161 "{!}") ; inverted exclamation mark +(standard-display-ascii 162 "{c}") ; cent sign +(standard-display-ascii 163 "{GBP}") ; pound sign +(standard-display-ascii 164 "{$}") ; general currency sign +(standard-display-ascii 165 "{JPY}") ; yen sign +(standard-display-ascii 166 "{|}") ; broken vertical line +(standard-display-ascii 167 "{S}") ; section sign +(standard-display-ascii 168 "{\"}") ; diaeresis +(standard-display-ascii 169 "{C}") ; copyright sign +(standard-display-ascii 170 "{_a}") ; ordinal indicator, feminine +(standard-display-ascii 171 "{<<}") ; left angle quotation mark +(standard-display-ascii 172 "{~}") ; not sign +(standard-display-ascii 173 "{-}") ; soft hyphen +(standard-display-ascii 174 "{R}") ; registered sign +(standard-display-ascii 175 "{=}") ; macron +(standard-display-ascii 176 "{o}") ; degree sign +(standard-display-ascii 177 "{+-}") ; plus or minus sign +(standard-display-ascii 178 "{2}") ; superscript two +(standard-display-ascii 179 "{3}") ; superscript three +(standard-display-ascii 180 "{'}") ; acute accent +(standard-display-ascii 181 "{u}") ; micro sign +(standard-display-ascii 182 "{P}") ; pilcrow +(standard-display-ascii 183 "{.}") ; middle dot +(standard-display-ascii 184 "{,}") ; cedilla +(standard-display-ascii 185 "{1}") ; superscript one +(standard-display-ascii 186 "{_o}") ; ordinal indicator, masculine +(standard-display-ascii 187 "{>>}") ; right angle quotation mark +(standard-display-ascii 188 "{1/4}") ; fraction one-quarter +(standard-display-ascii 189 "{1/2}") ; fraction one-half +(standard-display-ascii 190 "{3/4}") ; fraction three-quarters +(standard-display-ascii 191 "{?}") ; inverted question mark +(standard-display-ascii 192 "{`A}") ; A with grave accent +(standard-display-ascii 193 "{'A}") ; A with acute accent +(standard-display-ascii 194 "{^A}") ; A with circumflex accent +(standard-display-ascii 195 "{~A}") ; A with tilde +(standard-display-ascii 196 "{\"A}") ; A with diaeresis or umlaut mark +(standard-display-ascii 197 "{AA}") ; A with ring +(standard-display-ascii 198 "{AE}") ; AE diphthong +(standard-display-ascii 199 "{,C}") ; C with cedilla +(standard-display-ascii 200 "{`E}") ; E with grave accent +(standard-display-ascii 201 "{'E}") ; E with acute accent +(standard-display-ascii 202 "{^E}") ; E with circumflex accent +(standard-display-ascii 203 "{\"E}") ; E with diaeresis or umlaut mark +(standard-display-ascii 204 "{`I}") ; I with grave accent +(standard-display-ascii 205 "{'I}") ; I with acute accent +(standard-display-ascii 206 "{^I}") ; I with circumflex accent +(standard-display-ascii 207 "{\"I}") ; I with diaeresis or umlaut mark +(standard-display-ascii 208 "{-D}") ; D with stroke, Icelandic eth +(standard-display-ascii 209 "{~N}") ; N with tilde +(standard-display-ascii 210 "{`O}") ; O with grave accent +(standard-display-ascii 211 "{'O}") ; O with acute accent +(standard-display-ascii 212 "{^O}") ; O with circumflex accent +(standard-display-ascii 213 "{~O}") ; O with tilde +(standard-display-ascii 214 "{\"O}") ; O with diaeresis or umlaut mark +(standard-display-ascii 215 "{x}") ; multiplication sign +(standard-display-ascii 216 "{/O}") ; O with slash +(standard-display-ascii 217 "{`U}") ; U with grave accent +(standard-display-ascii 218 "{'U}") ; U with acute accent +(standard-display-ascii 219 "{^U}") ; U with circumflex accent +(standard-display-ascii 220 "{\"U}") ; U with diaeresis or umlaut mark +(standard-display-ascii 221 "{'Y}") ; Y with acute accent +(standard-display-ascii 222 "{TH}") ; capital thorn, Icelandic +(standard-display-ascii 223 "{ss}") ; small sharp s, German +(standard-display-ascii 224 "{`a}") ; a with grave accent +(standard-display-ascii 225 "{'a}") ; a with acute accent +(standard-display-ascii 226 "{^a}") ; a with circumflex accent +(standard-display-ascii 227 "{~a}") ; a with tilde +(standard-display-ascii 228 "{\"a}") ; a with diaeresis or umlaut mark +(standard-display-ascii 229 "{aa}") ; a with ring +(standard-display-ascii 230 "{ae}") ; ae diphthong +(standard-display-ascii 231 "{,c}") ; c with cedilla +(standard-display-ascii 232 "{`e}") ; e with grave accent +(standard-display-ascii 233 "{'e}") ; e with acute accent +(standard-display-ascii 234 "{^e}") ; e with circumflex accent +(standard-display-ascii 235 "{\"e}") ; e with diaeresis or umlaut mark +(standard-display-ascii 236 "{`i}") ; i with grave accent +(standard-display-ascii 237 "{'i}") ; i with acute accent +(standard-display-ascii 238 "{^i}") ; i with circumflex accent +(standard-display-ascii 239 "{\"i}") ; i with diaeresis or umlaut mark +(standard-display-ascii 240 "{-d}") ; d with stroke, Icelandic eth +(standard-display-ascii 241 "{~n}") ; n with tilde +(standard-display-ascii 242 "{`o}") ; o with grave accent +(standard-display-ascii 243 "{'o}") ; o with acute accent +(standard-display-ascii 244 "{^o}") ; o with circumflex accent +(standard-display-ascii 245 "{~o}") ; o with tilde +(standard-display-ascii 246 "{\"o}") ; o with diaeresis or umlaut mark +(standard-display-ascii 247 "{/}") ; division sign +(standard-display-ascii 248 "{/o}") ; o with slash +(standard-display-ascii 249 "{`u}") ; u with grave accent +(standard-display-ascii 250 "{'u}") ; u with acute accent +(standard-display-ascii 251 "{^u}") ; u with circumflex accent +(standard-display-ascii 252 "{\"u}") ; u with diaeresis or umlaut mark +(standard-display-ascii 253 "{'y}") ; y with acute accent +(standard-display-ascii 254 "{th}") ; small thorn, Icelandic +(standard-display-ascii 255 "{\"y}") ; small y with diaeresis or umlaut mark + +(provide 'iso8859-1-ascii) diff --git a/lisp/international/iso-insert.el b/lisp/international/iso-insert.el new file mode 100644 index 00000000000..3ea2e8530e8 --- /dev/null +++ b/lisp/international/iso-insert.el @@ -0,0 +1,620 @@ +;; Insert functions for ISO 8859/1. +;; Copyright (C) 1987 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 1, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +;; Written by Howard Gayle. See case-table.el for details. + +(defun insert-no-break-space () + (interactive "*") + (insert 160) +) + +(defun insert-inverted-exclamation-mark () + (interactive "*") + (insert 161) +) + +(defun insert-cent-sign () + (interactive "*") + (insert 162) +) + +(defun insert-pound-sign () + (interactive "*") + (insert 163) +) + +(defun insert-general-currency-sign () + (interactive "*") + (insert 164) +) + +(defun insert-yen-sign () + (interactive "*") + (insert 165) +) + +(defun insert-broken-vertical-line () + (interactive "*") + (insert 166) +) + +(defun insert-section-sign () + (interactive "*") + (insert 167) +) + +(defun insert-diaeresis () + (interactive "*") + (insert 168) +) + +(defun insert-copyright-sign () + (interactive "*") + (insert 169) +) + +(defun insert-ordinal-indicator-feminine () + (interactive "*") + (insert 170) +) + +(defun insert-angle-quotation-mark-left () + (interactive "*") + (insert 171) +) + +(defun insert-not-sign () + (interactive "*") + (insert 172) +) + +(defun insert-soft-hyphen () + (interactive "*") + (insert 173) +) + +(defun insert-registered-sign () + (interactive "*") + (insert 174) +) + +(defun insert-macron () + (interactive "*") + (insert 175) +) + +(defun insert-degree-sign () + (interactive "*") + (insert 176) +) + +(defun insert-plus-or-minus-sign () + (interactive "*") + (insert 177) +) + +(defun insert-superscript-two () + (interactive "*") + (insert 178) +) + +(defun insert-superscript-three () + (interactive "*") + (insert 179) +) + +(defun insert-acute-accent () + (interactive "*") + (insert 180) +) + +(defun insert-micro-sign () + (interactive "*") + (insert 181) +) + +(defun insert-pilcrow () + (interactive "*") + (insert 182) +) + +(defun insert-middle-dot () + (interactive "*") + (insert 183) +) + +(defun insert-cedilla () + (interactive "*") + (insert 184) +) + +(defun insert-superscript-one () + (interactive "*") + (insert 185) +) + +(defun insert-ordinal-indicator-masculine () + (interactive "*") + (insert 186) +) + +(defun insert-angle-quotation-mark-right () + (interactive "*") + (insert 187) +) + +(defun insert-fraction-one-quarter () + (interactive "*") + (insert 188) +) + +(defun insert-fraction-one-half () + (interactive "*") + (insert 189) +) + +(defun insert-fraction-three-quarters () + (interactive "*") + (insert 190) +) + +(defun insert-inverted-question-mark () + (interactive "*") + (insert 191) +) + +(defun insert-A-grave () + (interactive "*") + (insert 192) +) + +(defun insert-A-acute () + (interactive "*") + (insert 193) +) + +(defun insert-A-circumflex () + (interactive "*") + (insert 194) +) + +(defun insert-A-tilde () + (interactive "*") + (insert 195) +) + +(defun insert-A-umlaut () + (interactive "*") + (insert 196) +) + +(defun insert-A-ring () + (interactive "*") + (insert 197) +) + +(defun insert-AE () + (interactive "*") + (insert 198) +) + +(defun insert-C-cedilla () + (interactive "*") + (insert 199) +) + +(defun insert-E-grave () + (interactive "*") + (insert 200) +) + +(defun insert-E-acute () + (interactive "*") + (insert 201) +) + +(defun insert-E-circumflex () + (interactive "*") + (insert 202) +) + +(defun insert-E-umlaut () + (interactive "*") + (insert 203) +) + +(defun insert-I-grave () + (interactive "*") + (insert 204) +) + +(defun insert-I-acute () + (interactive "*") + (insert 205) +) + +(defun insert-I-circumflex () + (interactive "*") + (insert 206) +) + +(defun insert-I-umlaut () + (interactive "*") + (insert 207) +) + +(defun insert-D-stroke () + (interactive "*") + (insert 208) +) + +(defun insert-N-tilde () + (interactive "*") + (insert 209) +) + +(defun insert-O-grave () + (interactive "*") + (insert 210) +) + +(defun insert-O-acute () + (interactive "*") + (insert 211) +) + +(defun insert-O-circumflex () + (interactive "*") + (insert 212) +) + +(defun insert-O-tilde () + (interactive "*") + (insert 213) +) + +(defun insert-O-umlaut () + (interactive "*") + (insert 214) +) + +(defun insert-multiplication-sign () + (interactive "*") + (insert 215) +) + +(defun insert-O-slash () + (interactive "*") + (insert 216) +) + +(defun insert-U-grave () + (interactive "*") + (insert 217) +) + +(defun insert-U-acute () + (interactive "*") + (insert 218) +) + +(defun insert-U-circumflex () + (interactive "*") + (insert 219) +) + +(defun insert-U-umlaut () + (interactive "*") + (insert 220) +) + +(defun insert-Y-acute () + (interactive "*") + (insert 221) +) + +(defun insert-THORN () + (interactive "*") + (insert 222) +) + +(defun insert-ss () + (interactive "*") + (insert 223) +) + +(defun insert-a-grave () + (interactive "*") + (insert 224) +) + +(defun insert-a-acute () + (interactive "*") + (insert 225) +) + +(defun insert-a-circumflex () + (interactive "*") + (insert 226) +) + +(defun insert-a-tilde () + (interactive "*") + (insert 227) +) + +(defun insert-a-umlaut () + (interactive "*") + (insert 228) +) + +(defun insert-a-ring () + (interactive "*") + (insert 229) +) + +(defun insert-ae () + (interactive "*") + (insert 230) +) + +(defun insert-c-cedilla () + (interactive "*") + (insert 231) +) + +(defun insert-e-grave () + (interactive "*") + (insert 232) +) + +(defun insert-e-acute () + (interactive "*") + (insert 233) +) + +(defun insert-e-circumflex () + (interactive "*") + (insert 234) +) + +(defun insert-e-umlaut () + (interactive "*") + (insert 235) +) + +(defun insert-i-grave () + (interactive "*") + (insert 236) +) + +(defun insert-i-acute () + (interactive "*") + (insert 237) +) + +(defun insert-i-circumflex () + (interactive "*") + (insert 238) +) + +(defun insert-i-umlaut () + (interactive "*") + (insert 239) +) + +(defun insert-d-stroke () + (interactive "*") + (insert 240) +) + +(defun insert-n-tilde () + (interactive "*") + (insert 241) +) + +(defun insert-o-grave () + (interactive "*") + (insert 242) +) + +(defun insert-o-acute () + (interactive "*") + (insert 243) +) + +(defun insert-o-circumflex () + (interactive "*") + (insert 244) +) + +(defun insert-o-tilde () + (interactive "*") + (insert 245) +) + +(defun insert-o-umlaut () + (interactive "*") + (insert 246) +) + +(defun insert-division-sign () + (interactive "*") + (insert 247) +) + +(defun insert-o-slash () + (interactive "*") + (insert 248) +) + +(defun insert-u-grave () + (interactive "*") + (insert 249) +) + +(defun insert-u-acute () + (interactive "*") + (insert 250) +) + +(defun insert-u-circumflex () + (interactive "*") + (insert 251) +) + +(defun insert-u-umlaut () + (interactive "*") + (insert 252) +) + +(defun insert-y-acute () + (interactive "*") + (insert 253) +) + +(defun insert-thorn () + (interactive "*") + (insert 254) +) + +(defun insert-y-umlaut () + (interactive "*") + (insert 255) +) + +(defvar 8859-1-map nil "Keymap for ISO 8859/1 character insertion.") +(if 8859-1-map nil + (setq 8859-1-map (make-keymap)) + (define-key 8859-1-map " " 'insert-no-break-space) + (define-key 8859-1-map "!" 'insert-inverted-exclamation-mark) + (define-key 8859-1-map "\"" (make-sparse-keymap)) + (define-key 8859-1-map "\"\"" 'insert-diaeresis) + (define-key 8859-1-map "\"A" 'insert-A-umlaut) + (define-key 8859-1-map "\"E" 'insert-E-umlaut) + (define-key 8859-1-map "\"I" 'insert-I-umlaut) + (define-key 8859-1-map "\"O" 'insert-O-umlaut) + (define-key 8859-1-map "\"U" 'insert-U-umlaut) + (define-key 8859-1-map "\"a" 'insert-a-umlaut) + (define-key 8859-1-map "\"e" 'insert-e-umlaut) + (define-key 8859-1-map "\"i" 'insert-i-umlaut) + (define-key 8859-1-map "\"o" 'insert-o-umlaut) + (define-key 8859-1-map "\"u" 'insert-u-umlaut) + (define-key 8859-1-map "\"y" 'insert-y-umlaut) + (define-key 8859-1-map "'" (make-sparse-keymap)) + (define-key 8859-1-map "''" 'insert-acute-accent) + (define-key 8859-1-map "'A" 'insert-A-acute) + (define-key 8859-1-map "'E" 'insert-E-acute) + (define-key 8859-1-map "'I" 'insert-I-acute) + (define-key 8859-1-map "'O" 'insert-O-acute) + (define-key 8859-1-map "'U" 'insert-U-acute) + (define-key 8859-1-map "'Y" 'insert-Y-acute) + (define-key 8859-1-map "'a" 'insert-a-acute) + (define-key 8859-1-map "'e" 'insert-e-acute) + (define-key 8859-1-map "'i" 'insert-i-acute) + (define-key 8859-1-map "'o" 'insert-o-acute) + (define-key 8859-1-map "'u" 'insert-u-acute) + (define-key 8859-1-map "'y" 'insert-y-acute) + (define-key 8859-1-map "$" 'insert-general-currency-sign) + (define-key 8859-1-map "+" 'insert-plus-or-minus-sign) + (define-key 8859-1-map "," (make-sparse-keymap)) + (define-key 8859-1-map ",," 'insert-cedilla) + (define-key 8859-1-map ",C" 'insert-C-cedilla) + (define-key 8859-1-map ",c" 'insert-c-cedilla) + (define-key 8859-1-map "-" 'insert-soft-hyphen) + (define-key 8859-1-map "." 'insert-middle-dot) + (define-key 8859-1-map "/" (make-sparse-keymap)) + (define-key 8859-1-map "//" 'insert-division-sign) + (define-key 8859-1-map "/O" 'insert-O-slash) + (define-key 8859-1-map "/o" 'insert-o-slash) + (define-key 8859-1-map "1" (make-sparse-keymap)) + (define-key 8859-1-map "1/" (make-sparse-keymap)) + (define-key 8859-1-map "1/2" 'insert-fraction-one-half) + (define-key 8859-1-map "1/4" 'insert-fraction-one-quarter) + (define-key 8859-1-map "3" (make-sparse-keymap)) + (define-key 8859-1-map "3/" (make-sparse-keymap)) + (define-key 8859-1-map "3/4" 'insert-fraction-three-quarters) + (define-key 8859-1-map "<" 'insert-angle-quotation-mark-left) + (define-key 8859-1-map "=" 'insert-macron) + (define-key 8859-1-map ">" 'insert-angle-quotation-mark-right) + (define-key 8859-1-map "?" 'insert-inverted-question-mark) + (define-key 8859-1-map "A" (make-sparse-keymap)) + (define-key 8859-1-map "AA" 'insert-A-ring) + (define-key 8859-1-map "AE" 'insert-AE) + (define-key 8859-1-map "C" 'insert-copyright-sign) + (define-key 8859-1-map "D" 'insert-D-stroke) + (define-key 8859-1-map "L" 'insert-pound-sign) + (define-key 8859-1-map "P" 'insert-pilcrow) + (define-key 8859-1-map "R" 'insert-registered-sign) + (define-key 8859-1-map "S" 'insert-section-sign) + (define-key 8859-1-map "T" 'insert-THORN) + (define-key 8859-1-map "Y" 'insert-yen-sign) + (define-key 8859-1-map "^" (make-sparse-keymap)) + (define-key 8859-1-map "^1" 'insert-superscript-one) + (define-key 8859-1-map "^2" 'insert-superscript-two) + (define-key 8859-1-map "^3" 'insert-superscript-three) + (define-key 8859-1-map "^A" 'insert-A-circumflex) + (define-key 8859-1-map "^E" 'insert-E-circumflex) + (define-key 8859-1-map "^I" 'insert-I-circumflex) + (define-key 8859-1-map "^O" 'insert-O-circumflex) + (define-key 8859-1-map "^U" 'insert-U-circumflex) + (define-key 8859-1-map "^a" 'insert-a-circumflex) + (define-key 8859-1-map "^e" 'insert-e-circumflex) + (define-key 8859-1-map "^i" 'insert-i-circumflex) + (define-key 8859-1-map "^o" 'insert-o-circumflex) + (define-key 8859-1-map "^u" 'insert-u-circumflex) + (define-key 8859-1-map "_" (make-sparse-keymap)) + (define-key 8859-1-map "_a" 'insert-ordinal-indicator-feminine) + (define-key 8859-1-map "_o" 'insert-ordinal-indicator-masculine) + (define-key 8859-1-map "`" (make-sparse-keymap)) + (define-key 8859-1-map "`A" 'insert-A-grave) + (define-key 8859-1-map "`E" 'insert-E-grave) + (define-key 8859-1-map "`I" 'insert-I-grave) + (define-key 8859-1-map "`O" 'insert-O-grave) + (define-key 8859-1-map "`U" 'insert-U-grave) + (define-key 8859-1-map "`a" 'insert-a-grave) + (define-key 8859-1-map "`e" 'insert-e-grave) + (define-key 8859-1-map "`i" 'insert-i-grave) + (define-key 8859-1-map "`o" 'insert-o-grave) + (define-key 8859-1-map "`u" 'insert-u-grave) + (define-key 8859-1-map "a" (make-sparse-keymap)) + (define-key 8859-1-map "aa" 'insert-a-ring) + (define-key 8859-1-map "ae" 'insert-ae) + (define-key 8859-1-map "c" 'insert-cent-sign) + (define-key 8859-1-map "d" 'insert-d-stroke) + (define-key 8859-1-map "o" 'insert-degree-sign) + (define-key 8859-1-map "s" 'insert-ss) + (define-key 8859-1-map "t" 'insert-thorn) + (define-key 8859-1-map "u" 'insert-micro-sign) + (define-key 8859-1-map "x" 'insert-multiplication-sign) + (define-key 8859-1-map "|" 'insert-broken-vertical-line) + (define-key 8859-1-map "~" (make-sparse-keymap)) + (define-key 8859-1-map "~A" 'insert-A-tilde) + (define-key 8859-1-map "~N" 'insert-N-tilde) + (define-key 8859-1-map "~O" 'insert-O-tilde) + (define-key 8859-1-map "~a" 'insert-a-tilde) + (define-key 8859-1-map "~n" 'insert-n-tilde) + (define-key 8859-1-map "~o" 'insert-o-tilde) + (define-key 8859-1-map "~~" 'insert-not-sign) + (if (not (lookup-key global-map "\C-x8")) + (define-key global-map "\C-x8" 8859-1-map)) +) + +(provide 'iso8859-1-insert) diff --git a/lisp/international/iso-swed.el b/lisp/international/iso-swed.el new file mode 100644 index 00000000000..9ab2134381a --- /dev/null +++ b/lisp/international/iso-swed.el @@ -0,0 +1,140 @@ +;; Set up char tables for ISO 8859/1 for Swedish/Finnish terminals. +;; Copyright (C) 1987 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 1, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +;; Written by Howard Gayle. See case-table.el for details. + +;; This code sets up to display ISO 8859/1 characters on +;; terminals that have ASCII in the G0 set and a Swedish/Finnish +;; version of ISO 646 in the G1 set. The G1 set differs from +;; ASCII as follows: +;; +;; ASCII G1 +;; $ general currency sign +;; @ capital E with acute accent +;; [ capital A with diaeresis or umlaut mark +;; \ capital O with diaeresis or umlaut mark +;; ] capital A with ring +;; ^ capital U with diaeresis or umlaut mark +;; ` small e with acute accent +;; { small a with diaeresis or umlaut mark +;; | small o with diaeresis or umlaut mark +;; } small a with ring +;; ~ small u with diaeresis or umlaut mark + +(require 'disp-table) + +(standard-display-ascii 160 "{_}") ; NBSP (no-break space) +(standard-display-ascii 161 "{!}") ; inverted exclamation mark +(standard-display-ascii 162 "{c}") ; cent sign +(standard-display-ascii 163 "{GBP}") ; pound sign +(standard-display-g1 164 ?$) ; general currency sign +(standard-display-ascii 165 "{JPY}") ; yen sign +(standard-display-ascii 166 "{|}") ; broken vertical line +(standard-display-ascii 167 "{S}") ; section sign +(standard-display-ascii 168 "{\"}") ; diaeresis +(standard-display-ascii 169 "{C}") ; copyright sign +(standard-display-ascii 170 "{_a}") ; ordinal indicator, feminine +(standard-display-ascii 171 "{<<}") ; left angle quotation mark +(standard-display-ascii 172 "{~}") ; not sign +(standard-display-ascii 173 "{-}") ; soft hyphen +(standard-display-ascii 174 "{R}") ; registered sign +(standard-display-ascii 175 "{=}") ; macron +(standard-display-ascii 176 "{o}") ; degree sign +(standard-display-ascii 177 "{+-}") ; plus or minus sign +(standard-display-ascii 178 "{2}") ; superscript two +(standard-display-ascii 179 "{3}") ; superscript three +(standard-display-ascii 180 "{'}") ; acute accent +(standard-display-ascii 181 "{u}") ; micro sign +(standard-display-ascii 182 "{P}") ; pilcrow +(standard-display-ascii 183 "{.}") ; middle dot +(standard-display-ascii 184 "{,}") ; cedilla +(standard-display-ascii 185 "{1}") ; superscript one +(standard-display-ascii 186 "{_o}") ; ordinal indicator, masculine +(standard-display-ascii 187 "{>>}") ; right angle quotation mark +(standard-display-ascii 188 "{1/4}") ; fraction one-quarter +(standard-display-ascii 189 "{1/2}") ; fraction one-half +(standard-display-ascii 190 "{3/4}") ; fraction three-quarters +(standard-display-ascii 191 "{?}") ; inverted question mark +(standard-display-ascii 192 "{`A}") ; A with grave accent +(standard-display-ascii 193 "{'A}") ; A with acute accent +(standard-display-ascii 194 "{^A}") ; A with circumflex accent +(standard-display-ascii 195 "{~A}") ; A with tilde +(standard-display-g1 196 ?[) ; A with diaeresis or umlaut mark +(standard-display-g1 197 ?]) ; A with ring +(standard-display-ascii 198 "{AE}") ; AE diphthong +(standard-display-ascii 199 "{,C}") ; C with cedilla +(standard-display-ascii 200 "{`E}") ; E with grave accent +(standard-display-g1 201 ?@) ; E with acute accent +(standard-display-ascii 202 "{^E}") ; E with circumflex accent +(standard-display-ascii 203 "{\"E}") ; E with diaeresis or umlaut mark +(standard-display-ascii 204 "{`I}") ; I with grave accent +(standard-display-ascii 205 "{'I}") ; I with acute accent +(standard-display-ascii 206 "{^I}") ; I with circumflex accent +(standard-display-ascii 207 "{\"I}") ; I with diaeresis or umlaut mark +(standard-display-ascii 208 "{-D}") ; D with stroke, Icelandic eth +(standard-display-ascii 209 "{~N}") ; N with tilde +(standard-display-ascii 210 "{`O}") ; O with grave accent +(standard-display-ascii 211 "{'O}") ; O with acute accent +(standard-display-ascii 212 "{^O}") ; O with circumflex accent +(standard-display-ascii 213 "{~O}") ; O with tilde +(standard-display-g1 214 ?\\) ; O with diaeresis or umlaut mark +(standard-display-ascii 215 "{x}") ; multiplication sign +(standard-display-ascii 216 "{/O}") ; O with slash +(standard-display-ascii 217 "{`U}") ; U with grave accent +(standard-display-ascii 218 "{'U}") ; U with acute accent +(standard-display-ascii 219 "{^U}") ; U with circumflex accent +(standard-display-g1 220 ?^) ; U with diaeresis or umlaut mark +(standard-display-ascii 221 "{'Y}") ; Y with acute accent +(standard-display-ascii 222 "{TH}") ; capital thorn, Icelandic +(standard-display-ascii 223 "{ss}") ; small sharp s, German +(standard-display-ascii 224 "{`a}") ; a with grave accent +(standard-display-ascii 225 "{'a}") ; a with acute accent +(standard-display-ascii 226 "{^a}") ; a with circumflex accent +(standard-display-ascii 227 "{~a}") ; a with tilde +(standard-display-g1 228 ?{) ; a with diaeresis or umlaut mark +(standard-display-g1 229 ?}) ; a with ring +(standard-display-ascii 230 "{ae}") ; ae diphthong +(standard-display-ascii 231 "{,c}") ; c with cedilla +(standard-display-ascii 232 "{`e}") ; e with grave accent +(standard-display-g1 233 ?`) ; e with acute accent +(standard-display-ascii 234 "{^e}") ; e with circumflex accent +(standard-display-ascii 235 "{\"e}") ; e with diaeresis or umlaut mark +(standard-display-ascii 236 "{`i}") ; i with grave accent +(standard-display-ascii 237 "{'i}") ; i with acute accent +(standard-display-ascii 238 "{^i}") ; i with circumflex accent +(standard-display-ascii 239 "{\"i}") ; i with diaeresis or umlaut mark +(standard-display-ascii 240 "{-d}") ; d with stroke, Icelandic eth +(standard-display-ascii 241 "{~n}") ; n with tilde +(standard-display-ascii 242 "{`o}") ; o with grave accent +(standard-display-ascii 243 "{'o}") ; o with acute accent +(standard-display-ascii 244 "{^o}") ; o with circumflex accent +(standard-display-ascii 245 "{~o}") ; o with tilde +(standard-display-g1 246 ?|) ; o with diaeresis or umlaut mark +(standard-display-ascii 247 "{/}") ; division sign +(standard-display-ascii 248 "{/o}") ; o with slash +(standard-display-ascii 249 "{`u}") ; u with grave accent +(standard-display-ascii 250 "{'u}") ; u with acute accent +(standard-display-ascii 251 "{^u}") ; u with circumflex accent +(standard-display-g1 252 ?~) ; u with diaeresis or umlaut mark +(standard-display-ascii 253 "{'y}") ; y with acute accent +(standard-display-ascii 254 "{th}") ; small thorn, Icelandic +(standard-display-ascii 255 "{\"y}") ; small y with diaeresis or umlaut mark + +(provide 'iso8859-1-swedish) diff --git a/lisp/international/swedish.el b/lisp/international/swedish.el new file mode 100644 index 00000000000..bda8a7183a4 --- /dev/null +++ b/lisp/international/swedish.el @@ -0,0 +1,145 @@ +;; Miscellaneous functions for dealing with Swedish. +;; Copyright (C) 1988 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 1, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +;; Written by Howard Gayle. See case-table.el for details. + +;; See iso-swed.el for a description of the character set. + +(require 'iso-syntax) + +(defvar swedish-re + "[ \t\n]\\(och\\|att\\|en\\|{r\\|\\[R\\|p}\\|P\\]\\|som\\|det\\|av\\|den\\|f|r\\|F\\\\R\\)[ \t\n.,?!:;'\")}]" + "Regular expression for common Swedish words.") + +(defvar swascii-to-8859-trans + (let ((string (make-string 256 ? )) + (i 0)) + (while (< i 256) + (aset string i i) + (setq i (1+ i))) + (aset string ?\[ 196) + (aset string ?\] 197) + (aset string ?\\ 214) + (aset string ?^ 220) + (aset string ?\{ 228) + (aset string ?\} 229) + (aset string ?\` 233) + (aset string ?\| 246) + (aset string ?~ 252) + string) + "Trans table from SWASCII to 8859.") + +; $ is not converted because it almost always means US +; dollars, not general currency sign. @ is not converted +; because it is more likely to be an at sign in a mail address +; than an E with acute accent. + +(defun swascii-to-8859-buffer () + "Convert characters in buffer from Swedish/Finnish-ascii to ISO 8859/1. +Works even on read-only buffers. `$' and `@' are not converted." + (interactive) + (let ((buffer-read-only nil)) + (translate-region (point-min) (point-max) swascii-to-8859-trans))) + +(defun swascii-to-8859-buffer-maybe () + "Call swascii-to-8859-buffer if the buffer looks like Swedish-ascii. +Leaves point just after the word that looks Swedish." + (interactive) + (let ((case-fold-search t)) + (if (re-search-forward swedish-re nil t) + (swascii-to-8859-buffer)))) + +(setq rmail-show-message-hook 'swascii-to-8859-buffer-maybe) + +(or (boundp 'news-group-hook-alist) (setq news-group-hook-alist nil)) +(setq news-group-hook-alist + (append '(("^swnet." . swascii-to-8859-buffer-maybe)) + news-group-hook-alist)) + +(defvar 8859-to-swascii-trans + (let ((string (make-string 256 ? )) + (i 0)) + (while (< i 256) + (aset string i i) + (setq i (1+ i))) + (aset string 164 ?$) + (aset string 196 ?\[) + (aset string 197 ?\]) + (aset string 201 ?@) + (aset string 214 ?\\) + (aset string 220 ?^) + (aset string 228 ?\{) + (aset string 229 ?\}) + (aset string 233 ?\`) + (aset string 246 ?\|) + (aset string 252 ?~) + string) + "8859 to SWASCII trans table.") + +(defun 8859-to-swascii-buffer () + "Convert characters in buffer from ISO 8859/1 to Swedish/Finnish-ascii." + (interactive "*") + (translate-region (point-min) (point-max) 8859-to-swascii-trans)) + +(setq mail-send-hook '8859-to-swascii-buffer) +(setq news-inews-hook '8859-to-swascii-buffer) + +;; It's not clear what purpose is served by a separate +;; Swedish mode that differs from Text mode only in having +;; a separate abbrev table. Nothing says that the abbrevs you +;; define in Text mode have to be English! + +;(defvar swedish-mode-abbrev-table nil +; "Abbrev table used while in swedish mode.") +;(define-abbrev-table 'swedish-mode-abbrev-table ()) + +;(defun swedish-mode () +; "Major mode for editing Swedish text intended for humans to +;read. Special commands:\\{text-mode-map} +;Turning on swedish-mode calls the value of the variable +;text-mode-hook, if that value is non-nil." +; (interactive) +; (kill-all-local-variables) +; (use-local-map text-mode-map) +; (setq mode-name "Swedish") +; (setq major-mode 'swedish-mode) +; (setq local-abbrev-table swedish-mode-abbrev-table) +; (set-syntax-table text-mode-syntax-table) +; (run-hooks 'text-mode-hook)) + +;(defun indented-swedish-mode () +; "Major mode for editing indented Swedish text intended for +;humans to read.\\{indented-text-mode-map} +;Turning on indented-swedish-mode calls the value of the +;variable text-mode-hook, if that value is non-nil." +; (interactive) +; (kill-all-local-variables) +; (use-local-map text-mode-map) +; (define-abbrev-table 'swedish-mode-abbrev-table ()) +; (setq local-abbrev-table swedish-mode-abbrev-table) +; (set-syntax-table text-mode-syntax-table) +; (make-local-variable 'indent-line-function) +; (setq indent-line-function 'indent-relative-maybe) +; (use-local-map indented-text-mode-map) +; (setq mode-name "Indented Swedish") +; (setq major-mode 'indented-swedish-mode) +; (run-hooks 'text-mode-hook)) + +(provide 'swedish) |