...
 
Commits (3)
2018-09-08 MORIOKA Tomohiko <tomo.git@chise.org>
* hng-install-db.el: For each source, specify region and type [for
KR and MISC sources, omit types].
* hng-read.el (hng-read-field): Add new optional arguments
`region' and `type'.
2017-08-27 MORIOKA Tomohiko <tomo.git@chise.org>
* hng-install-db.el:
......
This diff is collapsed.
;;; hng-read.el --- Utility to read the HNG database ; -*- coding: utf-8-mcs-er; -*-
;; Copyright (C) 2015 MORIOKA Tomohiko
;; Copyright (C) 2015, 2018 MORIOKA Tomohiko
;; Author: MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
;; Keywords: HNG, CHISE
......@@ -24,7 +24,8 @@
;;; Code:
(defun hng-read-field (buffer name field &optional add-ucs-to-hng-link)
(defun hng-read-field (buffer name field
&optional add-ucs-to-hng-link region type)
(with-current-buffer buffer
(goto-line 2)
(let (line id daikanwa radical ucs mchr note code hng-code sub ccs
......@@ -88,7 +89,13 @@
;; (setq ret (char-feature uc '->HNG))
;; (unless (memq chr ret)
;; (put-char-attribute uc '->HNG (cons chr ret))))
(put-char-attribute chr '<-HNG
(put-char-attribute chr
(if region
(intern
(if type
(format "<-HNG@%s/%s" region type)
(format "<-HNG@%s" region)))
'<-HNG)
(cons mchr (string-to-list variant)))
)
)
......