SKK専用スレッド Part4

このエントリーをはてなブックマークに追加
(defadvice skk-henkan-in-minibuff (around num-format-info activate)
(if (skk-numeric-p)
(save-window-excursion
(let ((buff (get-buffer-create "*数値変換フォーマット*")))
(with-current-buffer buff
(erase-buffer)
(insert "#0 無変換 ex. 12\n"
"#1 全角数字 ex. 12\n"
"#2 漢数字で位取りなし ex. 五五〇〇\n"
"#3 漢数字で位取りあり ex. 五千五百\n"
"#4 数値再変換\n"
"#5 金額表記 ex. 壱阡九百九拾伍\n"
"#9 将棋用\n"))
(let ((minibuf-p (skk-in-minibuffer-p))
(window (get-buffer-window
(skk-minibuffer-origin))))
(when minibuf-p
(if window
(select-window window)
(other-window 1)))
(unless (eq (next-window) (selected-window))
(delete-other-windows))
(save-selected-window
(pop-to-buffer buff)
(unless (pos-visible-in-window-p)
(recenter '(1))))
(when minibuf-p
(select-window (minibuffer-window))))
ad-do-it
(kill-buffer buff)))
ad-do-it))