Mercurial > hg > xemacs-beta
annotate lisp/mule/ethiopic.el @ 5916:1152e0091f8c
Avoid confusion about ELC vs. source file encoding, #'load, #'load-internal.
lisp/ChangeLog addition:
2015-06-03 Aidan Kehoe <kehoea@parhasard.net>
* code-files.el (load):
Revise this to respect load-ignore-out-of-date-elc-files, rather
than leaving that to #'load-internal. Avoids a corner case where
the source and the compiled file have different, incompatible
encodings.
Move the call to #'substitute-in-file-name here.
No longer check for a zero-length filename, since #'load-internal
no longer chokes on same and errors correctly.
src/ChangeLog addition:
2015-06-03 Aidan Kehoe <kehoea@parhasard.net>
* lread.c (Fload_internal):
Delegate calling the handler and #'substitute-in-file-name to #'load.
Error correctly with a zero-length file name, instead of giving a
bus error on my machine.
Delegate the check for out-of-date ELC files to #'load,
avoiding a bug where the encoding of the ELC file and the source
file differed.
* lread.c (PRINT_LOADING_MESSAGE_1):
This is simplified, now we no longer have to talk about
out-of-date ELC files.
tests/ChangeLog addition:
2015-06-03 Aidan Kehoe <kehoea@parhasard.net>
* automated/file-tests.el:
Gross sanity check for #'load and #'load-internal with a
zero-length FILE, something that crashed until today.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 03 Jun 2015 20:13:07 +0100 |
parents | 308d34e9f07d |
children |
rev | line source |
---|---|
353 | 1 ;;; ethiopic.el --- Support for Ethiopic -*- coding: iso-2022-7bit; -*- |
2 | |
3 ;; Copyright (C) 1995,1999 Electrotechnical Laboratory, JAPAN. | |
4 ;; Licensed to the Free Software Foundation. | |
5 ;; Copyright (C) 1997 MORIOKA Tomohiko | |
6 | |
7 ;; Keywords: multilingual, Ethiopic | |
8 | |
9 ;; This file is part of XEmacs. | |
10 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4072
diff
changeset
|
11 ;; XEmacs is free software: you can redistribute it and/or modify it |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4072
diff
changeset
|
12 ;; under the terms of the GNU General Public License as published by the |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4072
diff
changeset
|
13 ;; Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4072
diff
changeset
|
14 ;; option) any later version. |
353 | 15 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4072
diff
changeset
|
16 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4072
diff
changeset
|
17 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4072
diff
changeset
|
18 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4072
diff
changeset
|
19 ;; for more details. |
353 | 20 |
21 ;; You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4072
diff
changeset
|
22 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
353 | 23 |
24 ;; Author: TAKAHASHI Naoto <ntakahas@etl.go.jp> | |
25 ;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp> for XEmacs. | |
26 | |
27 ;;; Code: | |
28 | |
778 | 29 ;; Ethiopic characters (Amahric and Tigrigna). |
30 (make-charset 'ethiopic "Ethiopic characters" | |
31 '(dimension | |
32 2 | |
3659 | 33 registries ["Ethiopic-Unicode"] |
353 | 34 chars 94 |
778 | 35 columns 2 |
36 direction l2r | |
353 | 37 final ?3 |
38 graphic 0 | |
778 | 39 short-name "Ethiopic" |
40 long-name "Ethiopic characters" | |
353 | 41 )) |
42 | |
43 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
44 ;;; ETHIOPIC | |
45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
46 | |
47 (define-category ?E "Ethiopic (Ge'ez) character.") | |
48 (modify-category-entry 'ethiopic ?E) | |
49 | |
50 (define-ccl-program ccl-encode-ethio-font | |
51 '(0 | |
52 ;; In: R0:ethiopic (not checked) | |
53 ;; R1:position code 1 | |
54 ;; R2:position code 2 | |
55 ;; Out: R1:font code point 1 | |
56 ;; R2:font code point 2 | |
57 ((r1 -= 33) | |
58 (r2 -= 33) | |
59 (r1 *= 94) | |
60 (r2 += r1) | |
61 (if (r2 < 256) | |
4072 | 62 (r1 = #x12) |
353 | 63 (if (r2 < 448) |
4072 | 64 ((r1 = #x13) (r2 -= 256)) |
65 ((r1 = #xfd) (r2 -= 208)) | |
353 | 66 )))) |
67 "CCL program to encode an Ethiopic code to code point of Ethiopic font.") | |
68 | |
444 | 69 (set-charset-ccl-program 'ethiopic 'ccl-encode-ethio-font) |
353 | 70 |
71 (set-language-info-alist | |
72 "Ethiopic" '((setup-function . setup-ethiopic-environment-internal) | |
73 (exit-function . exit-ethiopic-environment) | |
74 (charset ethiopic) | |
75 (coding-system iso-2022-7bit) | |
76 (coding-priority iso-2022-7bit) | |
3970 | 77 ;; (input-method . "ethiopic") |
353 | 78 (features ethio-util) |
79 (sample-text . "$(3$Q#U!.(B") | |
80 (documentation . t))) | |
81 | |
3659 | 82 ;; In a more ideal world, we could set the default face fallback from here |
83 ;; to use one of the misc-fixed sizes that handles Ethiopic. | |
84 | |
353 | 85 ;;; ethiopic.el ends here |