C-u C-M-x
使用edebug检测评估defun表单。我能以编程方式执行此操作吗?我想这样做,因为我想写一个以下形式的elisp文件:
;;; define a function with edebug instrumented.
...
;;; do something that invokes the function with particular arguments.
...
然后我可以在该elisp文件上运行emacs -q --load
,逐步执行代码,了解有关错误的进一步调查,在我原来的emacs会话中编辑elisp文件,再次运行emacs -q --load
,并重复。
答案 0 :(得分:3)
在~/test.el
:
(defun square (x)
(* x x))
在~/testtest.el
:
(with-current-buffer (find-file-noselect "~/test.el")
(re-search-forward "square")
(edebug-defun))
(square 5)
在bash
:
emacs -q -l ~/testtest.el