+(defun unidata-gen-brackets-list ()
+ (let ((head (list nil))
+ tail)
+ (with-temp-buffer
+ (insert-file-contents (expand-file-name "BidiBrackets.txt" unidata-dir))
+ (goto-char (point-min))
+ (setq tail head)
+ (while (re-search-forward
+ "^\\([0-9A-F]+\\);\\s +\\([0-9A-F]+\\);\\s +\\([oc]\\)"
+ nil t)
+ (let ((char (string-to-number (match-string 1) 16))
+ (paired (match-string 2)))
+ (setq tail (setcdr tail (list (list char paired)))))))
+ (cdr head)))
+
+(defun unidata-gen-bracket-type-list ()
+ (let ((head (list nil))
+ tail)
+ (with-temp-buffer
+ (insert-file-contents (expand-file-name "BidiBrackets.txt" unidata-dir))
+ (goto-char (point-min))
+ (setq tail head)
+ (while (re-search-forward
+ "^\\([0-9A-F]+\\);\\s +\\([0-9A-F]+\\);\\s +\\([oc]\\)"
+ nil t)
+ (let ((char (string-to-number (match-string 1) 16))
+ (type (match-string 3)))
+ (setq tail (setcdr tail (list (list char type)))))))
+ (cdr head)))
+