emacs/sekka.el in sekka-0.8.3 vs emacs/sekka.el in sekka-0.8.4
- old
+ new
@@ -510,33 +510,27 @@
(defun sekka-add-new-word-to-jisyo (file yomi tango)
"FILE Sekka辞書ファイルと見做し、ファイルの先頭に「読み」と「単語」のペアを書き込む
登録が成功したかどうかを t or nil で返す"
- (if (sekka-file-existp file)
- (let ((buf-name (file-name-nondirectory file))
- (added nil))
- (save-excursion
- (find-file file)
- (with-current-buffer (get-buffer buf-name)
- (goto-char (point-min))
- (let ((newstr (format "%s /%s/" yomi tango)))
- (when (not (search-forward newstr nil t))
- (insert newstr)
- (insert "\n")
- (save-buffer)
+ (let ((buf-name (file-name-nondirectory file)))
+ (save-excursion
+ (find-file file)
+ (with-current-buffer (get-buffer buf-name)
+ (goto-char (point-min))
+ (let ((newstr (format "%s /%s/" yomi tango)))
+ (when (not (search-forward newstr nil t))
+ (insert newstr)
+ (insert "\n")
+ (save-buffer)
(setq added t)
)))
- (kill-buffer-if-not-modified (get-buffer buf-name)))
- added)
- (progn
- (message (format "Sekka辞書 %s が存在しません..." file))
- nil)))
-
-
+ (kill-buffer-if-not-modified (get-buffer buf-name)))
+ t))
+
;; ポータブル文字列置換( EmacsとXEmacsの両方で動く )
(defun sekka-replace-regexp-in-string (regexp replace str)
(cond ((featurep 'xemacs)
(replace-in-string str regexp replace))
(t
@@ -739,16 +733,16 @@
(map (make-sparse-keymap))
(result
(popup-menu* lst
:scroll-bar t
:margin t
- :keymap sekka-popup-menu-keymap)))
+ :keymap sekka-popup-menu-keymap
+ :initial-offset sekka-cand-cur)))
(let ((selected-word (car (split-string result " "))))
- (setq sekka-cand-cur (sekka-find-by-tango selected-word))
- (sekka-select-kakutei)))))
-
+ (setq sekka-cand-cur (sekka-find-by-tango selected-word))))))
+
;; 選択操作回数のリセット
(defun sekka-select-operation-reset ()
(setq sekka-select-operation-times 0))
;; 変換を確定し入力されたキーを再入力する関数
@@ -1417,10 +1411,10 @@
;; input-method として登録する。
(set-language-info "Japanese" 'input-method "japanese-sekka")
(setq default-input-method "japanese-sekka")
(defconst sekka-version
- "0.8.3" ;;SEKKA-VERSION
+ "0.8.4" ;;SEKKA-VERSION
)
(defun sekka-version (&optional arg)
"入力モード変更"
(interactive "P")
(message sekka-version))