How to pass a lambda expression in Elisp

前端 未结 1 1416
心在旅途
心在旅途 2021-01-13 15:15

So, I\'m trying to make a generic web search function in Elisp:

(defun look-up-base (url-formatter)
  (let (search url)
    (setq search(thing-at-point \'sym         


        
相关标签:
1条回答
  • 2021-01-13 15:42

    I think you need to use funcall:

    Instead of (url-formatter search) you should have (funcall url-formatter search).

    Lisp expects the name of a function as the first element of a list. If instead you have a symbol associated with a lambda expression or function name, you need to use funcall.

    0 讨论(0)
提交回复
热议问题