- 50 名前:名無しさん@お腹いっぱい。 mailto:sage [03/04/16 12:58]
- 変換回数を数えてみるテスト。
(defadvice skk-update-jisyo-1 (before skk-update-jisyo-with-conversion-count activate) (unless okurigana (if (string-match ";" word) (setq word (substring word 0 (match-beginning 0)))) (let* ((quoted (skk-quote-char word)) (top (cons nil (car old-words-list))) (parent top) (count 0) tmp) (while (cdr parent) (setq tmp (nth 1 parent)) (if (not (equal quoted (if (string-match ";" tmp) (substring tmp 0 (match-beginning 0)) tmp))) (setq parent (cdr parent)) (setq count (+ count (if (string-match ";\\([0-9]+\\)回$" tmp) (string-to-int (match-string 1 tmp)) 1))) (setcdr parent (nthcdr 2 parent)))) (setq old-words-list (cons (cdr top) (cdr old-words-list))) (or purge (setq word (format "%s;%d回" quoted (1+ count)))))))
|

|