Emacs complaining with invalid function?

不打扰是莪最后的温柔 提交于 2019-12-04 12:47:53

You are missing a progn form to group statements together:

(defun my-isend ()
  (interactive)

  (if (and transient-mark-mode mark-active)
      (isend-send)

    (progn
      (select-current-line)
      (isend-send))))

Without the progn form, ((select-current-line) (isend-send)) is interpreted as the (select-current-line) function applied to the result of calling isend-send without arguments. But (select-current-line) is not a valid function name. In other LISPs, such a construct could be valid if the return value of select-current-line was itself a function, which would then be applied to (isend-send). But this is not the case of Emacs LISP and this would not do what you wanted to achieve anyway...

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