我试图在 emacs 中建议一个函数,但没有任何反应。
(defadvice save-place-find-file-hook (after recenter activate)
"Recenter after getting to saved place."
(recenter))
也就是说,不会发生重新居中的情况。如果有 (message "foo")
,则 foo 确实会显示。关于 defadvice 我不知道什么?
最佳答案
find-file-hook
在显示缓冲区之前运行,因此您的重新定位不适用于您认为适用的缓冲区,并且在发生后立即撤消,当 find- file
用所选窗口中的新缓冲区替换当前缓冲区。
关于emacs - 建议使用 emacs 函数;缺陷通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14254260/