如何在emacs中禁用自动填充模式? [英] How can I disable auto-fill mode in emacs?

查看:134
本文介绍了如何在emacs中禁用自动填充模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我得到了我的新电脑(win 7,32位),并安装了 Vincelt小精灵Emacs 。唯一的其他事情是更新组织模式。



现在,我被困在自动填充模式每次我启动emacs新的,我讨厌的。我想现在和永远地关闭自动填充模式。我甚至删除了.emacs文件,但是 auto-fill-mode 仍然打开。



唯一的解决方案工作是(a)一个讨厌的解决方法或(b)总是输入 Mx自动填充模式每次我重新启动emacs。



我真的很高兴听到任何解决方案。



要清楚,当前.emacs文件包含的仅仅是:'(inhibit-startup-screen t)

解决方案

添加到您的 .emacs

 (自动填充模式-1)

如果有特定模式的钩子,那么您也需要对它们进行切换。我的怀疑是,在所有模式下,默认情况下实际上并不启用自动填充模式,但是您提供的信息至少应该是一个起点。



合理的保护措施也是禁止'text-mode-hook'自动填充模式:

 (remove -hook'text-mode-hook#'turn-on-auto-fill)

您可能需要对于其他模式也是类似的。


Today I got my new PC (win 7, 32 bit) and installed Vincelt Goulets Emacs. The only other thing I did was updating org-mode.

Now, I am stuck with auto-fill-mode on every time I start emacs new, which I hate. I would like to turn auto-fill-mode off, for now and forever. I even deleted my .emacs file but auto-fill-mode was still turned on.

The only solution that worked was (a) a nasty workaround or (b) always typing M-x auto-fill-mode everytime I start emacs anew.

I would be really happy to hear any solutions.


To be clear, the only thing the current .emacs file contains is: '(inhibit-startup-screen t)

解决方案

Add to your .emacs,

(auto-fill-mode -1)

If there are hooks for specific modes, you will need to zap those as well. My suspicion is that you do not actually have auto-fill-mode on by default in all modes, but with the information you have supplied, at least this should be a starting point.

A reasonable safeguard would be to also disable auto-fill mode from `text-mode-hook':

(remove-hook 'text-mode-hook #'turn-on-auto-fill)

You may need something similar for other modes as well.

这篇关于如何在emacs中禁用自动填充模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆