ソースを参照

do not query same word twice

pull/1/head
10sr 10年前
コミット
c800851662
1個のファイルの変更8行の追加0行の削除
  1. +8
    -0
      emacs.el

+ 8
- 0
emacs.el ファイルの表示

@@ -2388,6 +2388,7 @@ Freeze current input and show next prompt."

(defvar isdcv-sdcv-command "sdcv -n '%s'"
"Command of sdcv.")
(setq isdcv-sdcv-command "sdcv -n -u jmdict-en-ja '%s'")

(defvar isdcv-buffer nil
"Pointer to incremental sdcv buffer.")
@@ -2395,6 +2396,9 @@ Freeze current input and show next prompt."
(defvar isdcv--timer nil
"Idle timer object for isdcv.")

(defvar isdcv--last-input nil
"Last input queryed.")

(defun isdcv--timer-add ()
"Entry idle timer for isdcv."
(and (eq isdcv-buffer
@@ -2440,12 +2444,16 @@ This function insert newline if required."
(let ((input (isdcv--get-input))
(outpoint (isdcv--get-output-start)))
(and input
;; do not query same word twice
(not (eq isdcv--last-input
input))
outpoint
isdcv-sdcv-command
(save-excursion
(goto-char outpoint)
(delete-region (point)
(point-max))
(setq isdcv--last-input input)
(call-process-shell-command (format isdcv-sdcv-command
input)
nil


読み込み中…
キャンセル
保存