<div dir="ltr"><div>Hi everyone,</div><div><br></div><div>I'm quite new to hacking elisp (and this mailing list), so please bear</div><div>with me!</div><div><br></div><div>For the past week, I've been customizing evil-mode to fit my<br>
</div><div>needs. Recently, I've been having trouble setting the evil-lookup-func</div><div>variable. I want to add mode-hooks so that when I hit "K" (upper-case)</div><div>on a token in a buffer, the lookup functions that is called is</div>
<div>appropriate to the file type. For example, I'm trying to add a hook to</div><div>python-mode so that the evil-lookup-func variable is set locally to</div><div>py-documentation, but it's not working. Here is my current mode-hook:</div>
<div><br></div><div>(defun my-python-mode-hook()<br></div><div>� (setq evil-lookup-func #'py-documentation))</div><div>(add-hook 'python-mode-hook 'my-python-mode-hook)</div><div><br></div><div>When I hit "K" on a token in a python-mode buffer, I get the following<br>
</div><div>error:</div><div><br></div><div>funcall: Wrong number of arguments: (lambda (w) "Launch PyDOC on the<br></div><div>Word at Point" (interactive (list (let* ((word (thing-at-point (quote</div><div>word))) (input (read-string (format "pydoc entry%s: " (if (not word)</div>
<div>"" (format " (default %s)" word)))))) (if (string= input "") (if (not</div><div>word) (error "No pydoc args given") word) input)))) (shell-command</div><div>(concat py-shell-name " -c \"from pydoc import help;help('" w "')\"")</div>
<div>"*PYDOCS*") (view-buffer-other-window "*PYDOCS*" t (quote</div><div>kill-buffer-and-window))), 0</div><div><br></div><div>There are two main things that I need help with:<br></div><div>1. Why am I getting this error, even when there is a word under the</div>
<div>� �point? How can I resolve this bug?</div><div>2. How do I make this hook only apply to python-mode buffers? When I</div><div>� �hit "K" in any buffer, it calls this function. I'm sure there's a</div>
<div>� �simple solution, but like I said, I'm very new to elisp.</div><div><br></div><div>Thanks!</div><div style>D</div></div>