Prev / Next

2003-04-11 / skk - どの辞書からの変換候補なのか表示させる

SKK専用スレッド Part4
http://pc.2ch.net/test/read.cgi/unix/1049225392/33-

(defsubst my-skk-henkan-key-okuriari-p (k)
  (let ((fc (aref k 0))
        (lc (aref k (1- (length k)))))
    (and (>= fc ?ぁ)
         (<= fc ?ん)
         (>= lc ?a)
         (<= lc ?z))))

(defun my-skk-show-candidates (key)
  (interactive
   (list (read-string "key: ")))
  (let* ((skk-henkan-key key)
         (skk-henkan-okurigana
          (when (my-skk-henkan-key-okuriari-p key) ""))
         (prog-list (delete '(skk-look) skk-search-prog-list))
         (s
          (mapcar #'(lambda (l)
                      (delete "" l))
                  (eval (cons 'list prog-list)))))
    (message "%s" s)
    (with-current-buffer (get-buffer-create "*skk-candidates*")
      (goto-char (point-max))
      (insert (format "%s: %s\n" key s)))))

(defalias 'show-candidates 'my-skk-show-candidates)


M-x show-candidates

comments powered by Disqus