annotate lisp/mule/hebrew.el @ 4468:a78d697ccd2c

Import and extend GNU's descr-text.el, supporting prefix argument for C-x = 2008-05-25 Aidan Kehoe <kehoea@parhasard.net> * descr-text.el: New. Taken from GNU's GPLV2 version of 2007-02-14, with modifications for XEmacs support and extensions for Unihan.txt support and db/dbm caches. * simple.el (what-cursor-position): Support an optional prefix argument, as does GNU, calling #'describe-char to giving more detail on the character at point, notably from UnicodeData and (in our case, optionally) Unihan.txt. * syntax.el (syntax-after): Make this available for the sake of #'describe-char. * mule/mule-cmds.el (iso-2022-control-alist): Make this available, for the sake of #'encoded-string-description and #'describe-char. * mule/mule-cmds.el (encoded-string-description): Make this available, for the sake of #'describe-char. * unicode.el (unicode-error-default-translation-table): Make this a char table of type generic, not of type char. Makes it possible to have the relevant logic in #'describe-char reasonably clear; also, and this is undocumented, makes it much easier to implement #'frob-unicode-errors-region. I should document this, and revise #'frob-unicode-errors-region.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 25 May 2008 21:11:35 +0200
parents f4c3ffe60a4f
children 1d74a1d115ee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; hebrew.el --- Support for Hebrew -*- coding: iso-2022-7bit; -*-
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ;; Licensed to the Free Software Foundation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 ;; Keywords: multilingual, Hebrew
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; GNU General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; Boston, MA 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
450
98528da0b7fc Import from CVS: tag r21-2-40
cvs
parents: 428
diff changeset
27 ;; ISO 8859-8 (Hebrew) support.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
778
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
31 ; (make-charset 'hebrew-iso8859-8
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
32 ; "Right-Hand Part of Latin/Hebrew Alphabet (ISO/IEC 8859-8): ISO-IR-138"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
33 ; '(dimension
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
34 ; 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
35 ; registry "ISO8859-8"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
36 ; chars 96
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
37 ; columns 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
38 ; direction r2l
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
39 ; final ?H
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
40 ; graphic 1
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
41 ; short-name "RHP of ISO8859/8"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
42 ; long-name "RHP of Hebrew (ISO 8859-8): ISO-IR-138"
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
43 ; ))
2923009caf47 [xemacs-hg @ 2002-03-16 10:38:59 by ben]
ben
parents: 771
diff changeset
44
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 ;; Syntax of Hebrew characters
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 (loop for c from 96 to 122
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 do (modify-syntax-entry (make-char 'hebrew-iso8859-8 c) "w"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 (modify-syntax-entry (make-char 'hebrew-iso8859-8 32) "w") ; no-break space
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50
4299
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
51 (make-8-bit-coding-system
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
52 'iso-8859-8
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
53 '((#xAA ?\u00D7) ;; MULTIPLICATION SIGN
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
54 (#xBA ?\u00F7) ;; DIVISION SIGN
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
55 (#xDF ?\u2017) ;; DOUBLE LOW LINE
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
56 (#xE0 ?\u05D0) ;; HEBREW LETTER ALEF
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
57 (#xE1 ?\u05D1) ;; HEBREW LETTER BET
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
58 (#xE2 ?\u05D2) ;; HEBREW LETTER GIMEL
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
59 (#xE3 ?\u05D3) ;; HEBREW LETTER DALET
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
60 (#xE4 ?\u05D4) ;; HEBREW LETTER HE
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
61 (#xE5 ?\u05D5) ;; HEBREW LETTER VAV
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
62 (#xE6 ?\u05D6) ;; HEBREW LETTER ZAYIN
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
63 (#xE7 ?\u05D7) ;; HEBREW LETTER HET
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
64 (#xE8 ?\u05D8) ;; HEBREW LETTER TET
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
65 (#xE9 ?\u05D9) ;; HEBREW LETTER YOD
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
66 (#xEA ?\u05DA) ;; HEBREW LETTER FINAL KAF
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
67 (#xEB ?\u05DB) ;; HEBREW LETTER KAF
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
68 (#xEC ?\u05DC) ;; HEBREW LETTER LAMED
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
69 (#xED ?\u05DD) ;; HEBREW LETTER FINAL MEM
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
70 (#xEE ?\u05DE) ;; HEBREW LETTER MEM
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
71 (#xEF ?\u05DF) ;; HEBREW LETTER FINAL NUN
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
72 (#xF0 ?\u05E0) ;; HEBREW LETTER NUN
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
73 (#xF1 ?\u05E1) ;; HEBREW LETTER SAMEKH
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
74 (#xF2 ?\u05E2) ;; HEBREW LETTER AYIN
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
75 (#xF3 ?\u05E3) ;; HEBREW LETTER FINAL PE
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
76 (#xF4 ?\u05E4) ;; HEBREW LETTER PE
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
77 (#xF5 ?\u05E5) ;; HEBREW LETTER FINAL TSADI
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
78 (#xF6 ?\u05E6) ;; HEBREW LETTER TSADI
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
79 (#xF7 ?\u05E7) ;; HEBREW LETTER QOF
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
80 (#xF8 ?\u05E8) ;; HEBREW LETTER RESH
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
81 (#xF9 ?\u05E9) ;; HEBREW LETTER SHIN
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
82 (#xFA ?\u05EA) ;; HEBREW LETTER TAV
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
83 (#xFD ?\u200E) ;; LEFT-TO-RIGHT MARK
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
84 (#xFE ?\u200F)) ;; RIGHT-TO-LEFT MARK
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 450
diff changeset
85 "ISO-8859-8 (Hebrew)"
4299
f4c3ffe60a4f [xemacs-hg @ 2007-12-01 14:24:46 by aidan]
aidan
parents: 3970
diff changeset
86 '(mnemonic "MIME/Hbrw"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 (make-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 'ctext-hebrew 'iso2022
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 450
diff changeset
90 "ISO-8859-8-E (Hebrew, explicit directional coding)"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 '(charset-g0 ascii
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 charset-g1 hebrew-iso8859-8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 charset-g2 t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 charset-g3 t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 mnemonic "CText/Hbrw"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 ))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 (set-language-info-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 "Hebrew" '((charset hebrew-iso8859-8)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 (coding-system iso-8859-8)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 (coding-priority iso-8859-8)
3970
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 778
diff changeset
102 ;; Not available in packages.
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 778
diff changeset
103 ;; (input-method . "hebrew")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 (sample-text . "Hebrew [2],Hylem[0](B")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 (documentation . "Right-to-left writing is not yet supported.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 ))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 ;;; hebrew.el ends here