Put license information in each generated uni-*.el

* admin/unidata/unidata-gen.el (unidata-gen-file):
Get Copyright line from copyright.html.
Put information in file header, not separate README.
(unidata-gen-charprop): Mention the source location.
* lisp/international/README: Remove file.
This commit is contained in:
Glenn Morris 2017-05-09 21:31:46 -04:00
parent e7b6751c0a
commit 8452db0409
2 changed files with 16 additions and 23 deletions

View file

@ -1401,19 +1401,26 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)."
data-dir (or (pop command-line-args-left) default-directory)
unidata-text-file (or (pop command-line-args-left)
(expand-file-name "unidata.txt"))))
(let ((coding-system-for-write 'utf-8-unix)
(coding-system-for-read 'utf-8)
(unidata-dir data-dir))
(let* ((coding-system-for-write 'utf-8-unix)
(coding-system-for-read 'utf-8)
(unidata-dir data-dir)
(copyright (with-temp-buffer
(insert-file-contents
(expand-file-name "copyright.html" unidata-dir))
(re-search-forward "^Copyright .*Unicode, Inc.")
(match-string 0))))
(or unidata-list (unidata-setup-list unidata-text-file))
(let* ((basename (file-name-nondirectory file))
(elt (assoc basename unidata-file-alist)))
(or elt (user-error "Unknown output file: %s" basename))
(or noninteractive (message "Generating %s..." file))
(with-temp-file file
(insert ";; Copyright (C) 1991-2014 Unicode, Inc.
;; This file was generated from the Unicode data files at
;; http://www.unicode.org/Public/UNIDATA/.
;; See lisp/international/README for the copyright and permission notice.\n")
(insert ";; " copyright "
;; Generated from Unicode data files by unidata-gen.el.
;; The sources for this file are found in the admin/unidata/ directory in
;; the Emacs sources. The Unicode data files are used under the
;; Unicode Terms of Use, as contained in the file copyright.html in that
;; same directory.\n")
(dolist (proplist (cdr elt))
(let ((prop (unidata-prop-prop proplist))
(index (unidata-prop-index proplist))
@ -1443,7 +1450,8 @@ Property value is a symbol `o' (Open), `c' (Close), or `n' (None)."
(defun unidata-gen-charprop (&optional charprop-file)
(or charprop-file (setq charprop-file (pop command-line-args-left)))
(with-temp-file charprop-file
(insert ";; Automatically generated by unidata-gen.el.\n")
(insert ";; Automatically generated by unidata-gen.el.\n"
";; See the admin/unidata/ directory in the Emacs sources.\n")
(dolist (elt unidata-file-alist)
(dolist (proplist (cdr elt))
(insert (format "(define-char-code-property '%S %S\n %S)\n"

View file

@ -1,15 +0,0 @@
The following files in this directory are derived from the Unicode
Data File at http://www.unicode.org/Public/UNIDATA/UnicodeData.txt:
charprop.el uni-bidi.el uni-brackets.el uni-category.el
uni-combining.el uni-comment.el uni-decimal.el uni-decomposition.el
uni-digit.el uni-lowercase.el uni-mirrored.el uni-name.el
uni-numeric.el uni-old-name.el uni-special-lowercase.el
uni-special-titlecase.el uni-special-uppercase.el uni-titlecase.el
uni-uppercase.el
These files were generated from the version admin/unidata/UnicodeData.txt
in the Emacs sources, using the file unidata-gen.el in the same directory.
The file UnicodeData.txt is used under the Unicode Terms of Use,
contained in the file admin/unidata/copyright.html.