emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/language/hanja-util.el,v


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/lisp/language/hanja-util.el,v
Date: Thu, 05 Jun 2008 07:23:03 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   08/06/05 07:23:02

Index: hanja-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/language/hanja-util.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- hanja-util.el       3 Jun 2008 10:47:29 -0000       1.2
+++ hanja-util.el       5 Jun 2008 07:23:02 -0000       1.3
@@ -24,15 +24,18 @@
 
 ;;; Code:
 
-;; NEED COMMENT.
+;; How many characters to show at once.
 (defconst hanja-list-width 10)
 
-;; NEED COMMENT.  What is the key and what is the value?
-(defvar hanja-table
-  nil)
+(defvar hanja-table nil
+  "A hash table for hanja characters.  The key is a hangul character,
+and the vaule is a list of the corresponding hanja characters.
+Each element of the list has the form (CHAR) or (CHAR . STRING)
+where CHAR is a hanja character and STRING is the meaning of that
+character.  This variable is initialized by `hanja-init-load'.")
 
 (defun hanja-init-load ()
-  "Initialize hanja table. The table consists of character code and meaning."
+  "Initialize `hanja-table' (which see)."
   (message "Hanja table loading..")
   (when (not hanja-table)
     (setq hanja-table (make-hash-table))
@@ -1094,8 +1097,7 @@
                (18449) (18694) (19411) (19589) (19663) (19691) (19887))
              hanja-table)
     (puthash 44512
-             '((22343 . "고를 균") (33740 . "버섯 균") (40860 . "
-(피부가)틀 균, 거북 균") (37406 . "서른 근 균") (31584 . 
"대껍질 균, 속빈 대 균")
+             '((22343 . "고를 균") (33740 . "버섯 균") (40860 . 
"(피부가)틀 균, 거북 균") (37406 . "서른 근 균") (31584 . 
"대껍질 균, 속빈 대 균")
                (21243 . "고를 균") (30023 . "밭개간할 균") (21248) 
(22263 . "둥근곳집 균")
                (31259) (40591 . "고라니 균") (40597) (34944) (38055) 
(21569)
                (23790) (25251) (27758) (30853) (31640) (31647) (34448) (35232)
@@ -6145,8 +6147,7 @@
     (puthash 52492
          '((23544 . "치 촌, 마디 촌, 헤아릴 촌, 조금 촌")
          (26449 . "마을 촌, 밭집 촌, 시골 촌") (24534 . "헤아릴 
촌, 짐작할 촌")
-         (37032 . "村과 同字, 마을 촌") (21004) (21515 . "인치
-(inch) 촌") (23639) (28554) (31871))
+              (37032 . "村과 同字, 마을 촌") (21004) (21515 . "인치 
(inch) 촌") (23639) (28554) (31871))
          hanja-table)
     (puthash 52509
          '((32317 . "꿰맬 총, 거느릴 총, 합할 총, 끄덩이 잡을 
총")
@@ -7574,7 +7575,7 @@
            (35181 . "옷자락 꽂을 힐") (24644) (27439) (32723) (14954))
          hanja-table)))
 
-;; NEED COMMENT.
+;; List of current conversion status.
 (defvar hanja-conversions
   nil)
 
@@ -7603,20 +7604,21 @@
     map)
   "Keymap for Hanja (Korean Hanja Converter).")
 
-;; NEED COMMENT.  What is CONDP and LST?
 (defun hanja-filter (condp lst)
+  "Return list.
+It contains true elements to evaluate CONDP with each element from LST."
   (delq
    nil
    (mapcar (lambda (x) (and (funcall condp x) x)) lst)))
 
 (defun hanja-list-prev-group ()
-  "Select the prev group of conversions."
+  "Select the previous group of hangul->hanja conversions."
   (let ((base (aref hanja-conversions 0)))
     (if (> base 0)
         (aset hanja-conversions 0 (1- base)))))
 
 (defun hanja-list-next-group ()
-  "Select the next group of conversions."
+  "Select the next group of hangul->hanja conversions."
   (let* ((base (aref hanja-conversions 0))
          (offset (aref hanja-conversions 1))
          (next-list (nthcdr (* (1+ base) hanja-list-width)
@@ -7627,7 +7629,7 @@
           (aset hanja-conversions 1 (1- (length next-list)))))))
 
 (defun hanja-list-prev ()
-  "Select the prev candidate of conversion."
+  "Select the previous candidate of hangul->hanja conversion."
   (let ((base (aref hanja-conversions 0))
         (offset (aref hanja-conversions 1)))
     (cond ((> offset 0)
@@ -7637,7 +7639,7 @@
            (aset hanja-conversions 1 (1- hanja-list-width))))))
 
 (defun hanja-list-next ()
-  "Select the next candidate of conversion."
+  "Select the next candidate of hangul->hanja conversion."
   (let* ((base (aref hanja-conversions 0))
          (offset (aref hanja-conversions 1))
          (hanja-list (aref hanja-conversions 2)))
@@ -7650,7 +7652,7 @@
            (aset hanja-conversions 1 0)))))
 
 (defun hanja-list-show ()
-  "Show hanja list in echo area."
+  "Show hanja list in the echo area."
   (let* ((base (aref hanja-conversions 0))
          (offset (aref hanja-conversions 1))
          (hanja-list (aref hanja-conversions 2))
@@ -7676,7 +7678,7 @@
     (message "%s" msg)))
 
 (defun hanja-list-terminate ()
-  "Exit from hanja list with selected character."
+  "Exit from the hanja listing mode with the currently selected character."
   (let ((base (aref hanja-conversions 0))
         (offset (aref hanja-conversions 1))
         (hanja-list (aref hanja-conversions 2)))
@@ -7684,8 +7686,8 @@
       (car (nth (+ (* base hanja-list-width) offset) hanja-list)))))
 
 (defun hangul-to-hanja-char (char)
-  "Show hanja list that is converted characters from CHAR.
-Then return selected character code."
+  "Show the list of hanja characters converted from CHAR.
+The value is a hanja character that is selected interactively."
   (hanja-init-load)
   (let ((echo-keystrokes 0)
         (input-method-function nil))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]