diff options
author | Kenichi Handa <[email protected]> | 2009-06-12 07:21:57 +0000 |
---|---|---|
committer | Kenichi Handa <[email protected]> | 2009-06-12 07:21:57 +0000 |
commit | 1a3cbf350a9b5f4ac9d89747e80032308f0b5a4c (patch) | |
tree | 93545cc6e3f21422b942282d83a868a0114db653 /admin | |
parent | e7ff9e24b6e4d0ee8022f84fc3ad73484406f20b (diff) |
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 deca1c129c..5ae51b3dcf 100644 --- a/admin/charsets/mule-charsets.el +++ b/admin/charsets/mule-charsets.el @@ -19,11 +19,9 @@ ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. -(if (or (< emacs-major-version 21) - (< emacs-minor-version 3) - (and (= emacs-minor-version 3) - (string< emacs-version "21.3.50"))) - (error "Use Emacs of version 21.3.50 or later")) +(if (not (or (and (= emacs-major-version 21) (= emacs-minor-version 4)) + (= emacs-major-version 22))) + (error "Use Emacs of version 21.4 or any of version 22")) (defun func (start end) (while (<= start end) @@ -45,15 +43,15 @@ ("MULE-lviscii.map" . vietnamese-viscii-lower) ("MULE-uviscii.map" . vietnamese-viscii-upper))) -(setq file (car command-line-args-left)) -(or (stringp file) - (error "Invalid file name: %s" file)) -(setq charset (cdr (assoc file charset-alist))) -(or charset - (error "Invalid charset: %s" (car command-line-args-left))) +(defconst header + (format + "# Generated by running amdin/charsets/mule-charsets.el in Emacs %d.%d.\n" + emacs-major-version emacs-minor-version)) -(with-temp-buffer - (map-charset-chars 'func charset) - (write-file file)) +(dolist (elt charset-alist) + (with-temp-buffer + (insert header) + (map-charset-chars 'func (cdr elt)) + (write-file (car elt)))) ;;; arch-tag: 515989d7-2e2d-41cc-9163-05ad472fede4 |