]> code.delx.au - gnu-emacs/blobdiff - lisp/nxml/nxml-maint.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / nxml / nxml-maint.el
index 7fd3372cc5fd44be47caeaa125c3dd301b2558aa..5d24d9b313818664d94bf0150e687645fc116464 100644 (file)
@@ -1,6 +1,6 @@
-;;; nxml-maint.el --- commands for maintainers of nxml-*.el
+;;; nxml-maint.el --- commands for maintainers of nxml-*.el  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
 
 ;; Author: James Clark
 ;; Keywords: wp, hypermedia, languages, XML
 
 ;;; Code:
 
-;;; Generating files with Unicode char names.
-
-(require 'nxml-uchnm)
-
-(defun nxml-create-unicode-char-name-sets (file)
-  "Generate files containing char names from Unicode standard."
-  (interactive "fUnicodeData file: ")
-  (mapc (lambda (block)
-          (let ((nameset (nxml-unicode-block-char-name-set (nth 0 block))))
-            (save-excursion
-              (find-file (concat (get nameset 'nxml-char-name-set-file)
-                                 ".el"))
-              (erase-buffer)
-              (insert "(nxml-define-char-name-set '")
-              (prin1 nameset (current-buffer))
-              (insert "\n  '())\n")
-              (goto-char (- (point) 3)))))
-        nxml-unicode-blocks)
-  (save-excursion
-    (find-file file)
-    (goto-char (point-min))
-    (let ((blocks nxml-unicode-blocks)
-         code name)
-      (while (re-search-forward "^\\([0-9A-F]+\\);\\([^<;][^;]*\\);"
-                               nil
-                               t)
-       (setq code (string-to-number (match-string 1) 16))
-       (setq name (match-string 2))
-       (while (and blocks
-                   (> code (nth 2 (car blocks))))
-         (setq blocks (cdr blocks)))
-       (when (and (<= (nth 1 (car blocks)) code)
-                  (<= code (nth 2 (car blocks))))
-         (save-excursion
-           (find-file (concat (get (nxml-unicode-block-char-name-set
-                                    (nth 0 (car blocks)))
-                                   'nxml-char-name-set-file)
-                              ".el"))
-           (insert "(")
-           (prin1 name (current-buffer))
-           (insert (format " #x%04X)\n    " code))))))))
-
 ;;; Parsing target repertoire files from ucs-fonts.
 ;; This is for converting the TARGET? files in
 ;; http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz