소스 검색

set ilookup-alist for me

pull/1/head
10sr 11 년 전
부모
커밋
49fd3bad9b
1개의 변경된 파일18개의 추가작업 그리고 3개의 파일을 삭제
  1. +18
    -3
      emacs.el

+ 18
- 3
emacs.el 파일 보기

@@ -2338,8 +2338,6 @@ this is test, does not rename files."

;; TODO: enter to lookup word at point

;; TODO: enter on prompt to wait for output of command

(defvar ilookup-prompt ">>> "
"Prompt string for ilookup input.")

@@ -2414,6 +2412,20 @@ Each element should be in the form of (NAME . FUNCTION).
FUNCTION must accept one argument as word to search and return the string of
result for that word.")

(setq ilookup-alist
'(
("en" . (lambda (word)
(shell-command-to-string
(format "sdcv -n -u dictd_www.dict.org_gcide '%s'"
word))))
("ja" . (lambda (word)
(shell-command-to-string
(format "sdcv -n -u jmdict-en-ja '%s'"
word))))
))

(setq ilookup-default "ja")

(defun ilookup--timer-add ()
"Entry idle timer for ilookup."
(and (eq ilookup-buffer
@@ -2463,8 +2475,11 @@ This function insert newline if required."
(not (eq ilookup--last-input
input))
outpoint
(let* ((inputl (split-string input
(let* (
;; colon sepatated list of input
(inputl (split-string input
":"))
;; funcname for `ilookup-alist'
(fname (if (eq (length inputl)
2)
(car inputl)


불러오는 중...
취소
저장