Emacs: Search-Space for Find-Function

佐手、 提交于 2020-01-07 06:58:20

问题


Working on my first sbcl project in slime mode, I have trouble with setting up emacs properly for navigating within my code: Often, I would like to jump to the function definition (to any custom function within my source code) of a function. Therefore find-function seems to be a good starting point. Unfortunately, find-function never finds any of my functions: [No match]! My source code is located in a simple file like geometry.lisp with function definitions like:

    (defun get-right-normal(vector)
       "Computes right-normal of given vector"
       (make-2d-vector :x (* -1 (2d-vector-y vector)) :y (2d-vector-x vector)))

I added the path of the source file to the 'load-path variable:

    (add-to-list 'load-path "/path/to/src") 

The description of find-function says

The library where FUNCTION is defined is searched for in
`find-function-source-path', if non-nil, otherwise in `load-path'.

But trying to set `find-function-source-path by

    (add-to-list 'find-function-source-path "/path/to/src") 

returns

Symbol's value as variable is void: find-function-source-path

How can I set the value of this variable? What am I doing wrong?


回答1:


You must define things before you can ask for their values. The error message tells you that variable find-functions-source-path is not defined. Why? Because you have not loaded the library that defines it. You need to load library find-func.el[c]: (require 'find-func).



来源:https://stackoverflow.com/questions/30964283/emacs-search-space-for-find-function

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!