From: tomo Date: Wed, 31 Mar 2010 21:54:40 +0000 (+0000) Subject: (www-ids-find-version): Update to 0.24.3. X-Git-Tag: chise-base-0_25~17 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=824fa0144292454e3600091fe769e046db1c5aa3;p=chise%2Fids.git (www-ids-find-version): Update to 0.24.3. (www-ids-find-chise-link-map-url-prefix): Link to http://fonts.jp/chise_linkmap/ instead of http://kamichi.jp/chise_linkmap/. (www-ids-insert-chars-including-components): - Change threshold to omit recursive search: use num >= 1024 instead of num > 8192 [`num' means number of results]. - If num >= 2048, omit character sorting and formatting. - Change threshold to omit total-strokes based character sorting: use num >= 1024 instead of num > 4096. (www-batch-ids-find): Modify for `www-ids-insert-chars-including-components': there are no needs to print . --- diff --git a/www/www-ids-find.el b/www/www-ids-find.el index f3d0c1d..9ee1878 100644 --- a/www/www-ids-find.el +++ b/www/www-ids-find.el @@ -15,7 +15,7 @@ (concat dest (substring string i)) coding-system)))) -(defconst www-ids-find-version "0.24.2") +(defconst www-ids-find-version "0.24.3") (defvar www-ids-find-ideographic-products-file-name (expand-file-name "ideographic-products" @@ -26,7 +26,7 @@ chise-system-db-directory)))) (defvar www-ids-find-chise-link-map-url-prefix - "http://kamichi.jp/chise_linkmap/map.cgi?code=") + "http://fonts.jp/chise_linkmap/map.cgi?code=") (defvar www-ids-find-tang-chars-file-name "~tomo/projects/chise/ids/www/tang-chars.udd") @@ -161,52 +161,66 @@ (defun www-ids-insert-chars-including-components (components &optional ignored-chars) - (let ((products (copy-list (ideographic-products-find components))) + (let ((products (ideographic-products-find components)) is as bs len ignore-children) (setq len (length products)) - (dolist (c (cond - ((> len 8192) - (setq ignore-children t) - products) - ((> len 4096) - (sort products - (lambda (a b) - (< (char-int a)(char-int b)))) - ) - ((> len 512) - (sort products - (lambda (a b) - (if (setq as (char-total-strokes a)) - (if (setq bs (char-total-strokes b)) - (if (= as bs) - (< (char-int a)(char-int b)) - (< as bs)) - t) - (< (char-int a)(char-int b))))) - ) - (t - (sort products - (lambda (a b) - (if (setq as (char-total-strokes a)) - (if (setq bs (char-total-strokes b)) - (if (= as bs) - (ideograph-char< a b) - (< as bs)) - t) - (ideograph-char< a b)))) - ))) - (unless (memq c ignored-chars) - (setq is (char-feature c 'ideographic-structure)) - (princ "
  • ") - (www-ids-find-format-line c is) - (unless ignore-children - (princ "\n")) + (when (>= len 1024) + (setq ignore-children t) + (princ + (encode-coding-string + "

    結果が多すぎるため、再帰的検索を省略しました。

    " + 'utf-8-jp-er))) + (if (>= len 2048) + (dolist (c products) + (www-ids-find-format-char c)) + (princ "\n") )) ignored-chars) @@ -318,9 +332,9 @@ ;; (ideographic-structure-member c is)) ;; components) ;; (www-ids-find-format-line c is))) - (princ "\n") ) (t (princ (encode-coding-string "