diff options
| author | Kenichi Handa | 2009-06-12 07:21:57 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2009-06-12 07:21:57 +0000 |
| commit | 1a3cbf350a9b5f4ac9d89747e80032308f0b5a4c (patch) | |
| tree | 93545cc6e3f21422b942282d83a868a0114db653 /admin | |
| parent | e7ff9e24b6e4d0ee8022f84fc3ad73484406f20b (diff) | |
| download | emacs-1a3cbf350a9b5f4ac9d89747e80032308f0b5a4c.tar.gz emacs-1a3cbf350a9b5f4ac9d89747e80032308f0b5a4c.zip | |
Mostly re-written to generate all MULE-*.map files.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/charsets/mule-charsets.el | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/admin/charsets/mule-charsets.el b/admin/charsets/mule-charsets.el index deca1c129c4..5ae51b3dcfd 100644 --- a/admin/charsets/mule-charsets.el +++ b/admin/charsets/mule-charsets.el | |||
| @@ -19,11 +19,9 @@ | |||
| 19 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 19 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | (if (or (< emacs-major-version 21) | 22 | (if (not (or (and (= emacs-major-version 21) (= emacs-minor-version 4)) |
| 23 | (< emacs-minor-version 3) | 23 | (= emacs-major-version 22))) |
| 24 | (and (= emacs-minor-version 3) | 24 | (error "Use Emacs of version 21.4 or any of version 22")) |
| 25 | (string< emacs-version "21.3.50"))) | ||
| 26 | (error "Use Emacs of version 21.3.50 or later")) | ||
| 27 | 25 | ||
| 28 | (defun func (start end) | 26 | (defun func (start end) |
| 29 | (while (<= start end) | 27 | (while (<= start end) |
| @@ -45,15 +43,15 @@ | |||
| 45 | ("MULE-lviscii.map" . vietnamese-viscii-lower) | 43 | ("MULE-lviscii.map" . vietnamese-viscii-lower) |
| 46 | ("MULE-uviscii.map" . vietnamese-viscii-upper))) | 44 | ("MULE-uviscii.map" . vietnamese-viscii-upper))) |
| 47 | 45 | ||
| 48 | (setq file (car command-line-args-left)) | 46 | (defconst header |
| 49 | (or (stringp file) | 47 | (format |
| 50 | (error "Invalid file name: %s" file)) | 48 | "# Generated by running amdin/charsets/mule-charsets.el in Emacs %d.%d.\n" |
| 51 | (setq charset (cdr (assoc file charset-alist))) | 49 | emacs-major-version emacs-minor-version)) |
| 52 | (or charset | ||
| 53 | (error "Invalid charset: %s" (car command-line-args-left))) | ||
| 54 | 50 | ||
| 55 | (with-temp-buffer | 51 | (dolist (elt charset-alist) |
| 56 | (map-charset-chars 'func charset) | 52 | (with-temp-buffer |
| 57 | (write-file file)) | 53 | (insert header) |
| 54 | (map-charset-chars 'func (cdr elt)) | ||
| 55 | (write-file (car elt)))) | ||
| 58 | 56 | ||
| 59 | ;;; arch-tag: 515989d7-2e2d-41cc-9163-05ad472fede4 | 57 | ;;; arch-tag: 515989d7-2e2d-41cc-9163-05ad472fede4 |