(www-ids-find-tang-chars-file-name): New variable.
authortomo <tomo>
Mon, 2 May 2005 08:27:58 +0000 (08:27 +0000)
committertomo <tomo>
Mon, 2 May 2005 08:27:58 +0000 (08:27 +0000)
(www-batch-ids-find): Use `www-ids-find-tang-chars-file-name'.

www/www-ids-find.el

index 288bbca..5e53e7c 100644 (file)
@@ -15,6 +15,9 @@
         (concat dest (substring string i))
         coding-system))))
 
+(defvar www-ids-find-tang-chars-file-name
+  "~tomo/projects/chise/ids/www/tang-chars.udd")
+
 (defun www-batch-ids-find ()
   (let ((components (car command-line-args-left))
        is ucs)
          (princ
           (or (if (setq ucs (or (char-ucs c)
                                 (encode-char c 'ucs)))
-                  (format "<a href=\"http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=%X\">%s</a>"
+                  (format " <a href=\"http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=%X\">%s</a>"
                           ucs
                           (cond ((<= ucs #xFFFF)
-                                 (format "    U+%04X" ucs))
+                                 (format "U+%04X" ucs))
                                 ((<= ucs #x10FFFF)
                                  (format "U-%08X" ucs))))
                 "          ")))
          (when (and ucs
                     (with-current-buffer
                         (find-file-noselect
-                         "~tomo/projects/chise/ids/www/tang-chars.udd")
+                         www-ids-find-tang-chars-file-name)
                       (goto-char (point-min))
                       (re-search-forward (format "^%d$" ucs) nil t)))
            (princ