vimのような通常の検索に加えて、カーソルの下の単語を強調表示するために、悪モードでkbd "*"にバインドする関数を.emacsに作成しようとしています。
次のスクリプトを変更しました: http://www.emacswiki.org/emacs/SearchAtPoint
これは私が持っているものです:
(defun isearch-yank-regexp (regexp)
"Pull REGEXP into search regexp."
(let ((isearch-regexp nil)) ;; Dynamic binding of global.
(isearch-yank-string regexp))
(if (not isearch-regexp)
(isearch-toggle-regexp))
(isearch-search-and-update))
(defun isearch-yank-symbol ()
"Put symbol at current point into search string."
(interactive)
(let ((sym (highlight-regexp)))
(if (null sym)
(message "No symbol at point")
(isearch-yank-regexp
(concat "\\_<" (regexp-quote sym) "\\_>")) 'hi-yellow)))
ここにいくつかのエラーがあるようです:
let: Wrong number of arguments: #[(regexp &optional face)
私はリスプ初心者です。
これを修正するのを手伝ってくれませんか?