我正在尝试编写一个小的lisp函数,以便在单个组织模式分支中运行flyspell。我已经将以下内容添加到我的.emacs文件中:
(defun flyspell-current-tree()
(interactive)
(org-mark-subtree)
(flyspell-region))
(global-set-key (kbd "S-<f8>") 'flyspell-current-tree)但在运行它时,我得到了以下错误:
flyspell-current-tree: Wrong number of arguments有什么想法吗?
发布于 2012-04-24 00:19:21
您需要向flyspell-region提供beg和end才能正常工作。错误来自于此,而不是实际上来自您的函数。
如果您将(point)和(mark)作为参数包含到flyspell-region中,它将正常工作。
(defun flyspell-current-tree()
(interactive)
(org-mark-subtree)
(flyspell-region (point) (mark)))https://stackoverflow.com/questions/10283393
复制相似问题