我通常一次打开两个emacs帧。
当我运行vc-diff
时,会创建一个新窗口,而不管某个窗口是否已经在显示该缓冲区。
有没有一般的方法来防止这种情况的发生?
发布于 2012-11-15 14:43:59
将pop-up-frames
设置为非空值将阻止pop-to-buffer
打开新窗口。相反,*vc-diff*
缓冲区将成为显示它的框架中的活动窗口。
(setq pop-up-frames t)
更改此变量也会影响使用pop-to-buffer
的其他函数。
发布于 2012-12-10 21:42:07
我认为您需要通过添加以下内容来为display-buffer--other-frame-action
定制display-buffer-base-action
(custom-set-variables
'(display-buffer-base-action display-buffer--other-frame-action))
发送到你的.emacs.el
或者
(custom-set-variables
'(display-buffer-base-action
'(display-buffer-reuse-window (reusable-frames . t))))
我建议阅读上面提到的关于所有变量(C-h v
)和函数(C-h f
)的帮助。
祝好运!
https://stackoverflow.com/questions/11985848
复制