<div dir="ltr"><div>Hi everyone,</div><div><br></div><div>I&#39;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&#39;ve been customizing evil-mode to fit my<br>
</div><div>needs. Recently, I&#39;ve been having trouble setting the evil-lookup-func</div><div>variable. I want to add mode-hooks so that when I hit &quot;K&quot; (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&#39;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&#39;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 #&#39;py-documentation))</div><div>(add-hook &#39;python-mode-hook &#39;my-python-mode-hook)</div><div><br></div><div>When I hit &quot;K&quot; 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) &quot;Launch PyDOC on the<br></div><div>Word at Point&quot; (interactive (list (let* ((word (thing-at-point (quote</div><div>word))) (input (read-string (format &quot;pydoc entry%s: &quot; (if (not word)</div>
<div>&quot;&quot; (format &quot; (default %s)&quot; word)))))) (if (string= input &quot;&quot;) (if (not</div><div>word) (error &quot;No pydoc args given&quot;) word) input)))) (shell-command</div><div>(concat py-shell-name &quot; -c \&quot;from pydoc import help;help(&#39;&quot; w &quot;&#39;)\&quot;&quot;)</div>
<div>&quot;*PYDOCS*&quot;) (view-buffer-other-window &quot;*PYDOCS*&quot; 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 &quot;K&quot; in any buffer, it calls this function. I&#39;m sure there&#39;s a</div>
<div>� �simple solution, but like I said, I&#39;m very new to elisp.</div><div><br></div><div>Thanks!</div><div style>D</div></div>