Keep Emacs from scrolling past end of buffer

我的未来我决定 提交于 2019-12-08 19:20:44

问题


Is there anything I can add to my .emacs file to keep emacs from adding new lines when I scroll past the end of the buffer with my mouse or the scrollbar? I already have

(setq next-line-add-newlines nil)

but that seems to only be applying to when I am moving with the keyboard. I've done quite a few searches on the subject to no avail.

Any tips are greatly appreciated! Thank you.


回答1:


Check the value of the the variable next-line-add-newlines in the buffers/modes that it's misbehaving. You can do so by: C-h v next-line-add-newlines (or M-x describe-variable).

It could be something in the major/minor mode that's enabling it.




回答2:


Have you checked whether this also happens in standard emacs (i.e. have you tested this behaviour when running emacs with --no-init-file) ?

If it doesn't, then the cause for this problem has to lie somewhere in your dotfiles.



来源:https://stackoverflow.com/questions/4675772/keep-emacs-from-scrolling-past-end-of-buffer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!