我正在编辑一些具有相当长函数的 Python 代码,并认为无需向上滚动即可快速获取函数名称会很有用。我把这段代码放在一起来做。一般来说,emacs 中是否有一些内置的东西,或者特别是标准的 python 模式,我可以使用它来代替?
(defun python-show-function-name()
"Message the name of the function the point is in"
(interactive)
(save-excursion
(beginning-of-defun)
(message (format "%s" (thing-at-point 'line)))))