Keep Emacs from scrolling past end of buffer

2019-06-17 07:25发布

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.

2条回答
兄弟一词,经得起流年.
2楼-- · 2019-06-17 07:40

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.

查看更多
做个烂人
3楼-- · 2019-06-17 07:52

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.

查看更多
登录 后发表回答