Emacs版本24.4:击中RETURN时新的令人讨厌的缩进丢失 [英] Emacs version 24.4: New obnoxious loss of indentation on hitting RETURN

查看:127
本文介绍了Emacs版本24.4:击中RETURN时新的令人讨厌的缩进丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Emacs 24.4开始,当我键入以空白开头的行(一个典型的方式是
表示一个新段落),最后我点击RETURN,空格消失。
这个问题也出现在'emacs -Q'上。
我的.emacs文件使用一个相当纯粹的文本模式分段方案,即

 (setq default-major- mode'text-mode)
(add-hook'text-mode-hook'paragraph-indent-minor-mode)

已经十几年没有任何问题地工作。当我安装当前的(24.4)版本时出现错误。



基本上,我键入:

 这是一个以四个空格开头的行

只要我输入返回我的行立即成为

 这是一个以四个空格开头的行
pre>

也就是说,缩进消失。我非常感谢一些建议。
我应该发布一个错误吗?

解决方案

在Emacs 24.4中,电压缩模式默认启用。这似乎是与 paragraph-indent-minor-mode 相结合的原因。您可以通过关闭电压缩模式( Mx电压缩模式)或仅在本地缓冲区( Mx电压缩 - 本地模式)。


Starting with Emacs 24.4, when I type a line beginning with white space (a typical way to denote a new paragraph) and at the end of it I hit RETURN, the white space disappears. This problem appears also with 'emacs -Q'. My .emacs file uses a rather plain text-mode paragraphing scheme, namely,

(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'paragraph-indent-minor-mode)

which has been working without problems for a dozen years. The bug appeared when I installed the current (24.4) version.

Basically, I type:

   This is a line beginning with four spaces

and as soon as I type RETURN my line immediately becomes

This is a line beginning with four spaces

That is, the indentation vanishes. I'd much appreciate some advice. Should I post a bug?

解决方案

In Emacs 24.4, electric-indent-mode is enabled by default. It seems like that's what's causing this problem in combination with paragraph-indent-minor-mode. You can avoid that by turning off Electric Indent mode everywhere (M-x electric-indent-mode) or just in the local buffer (M-x electric-indent-local-mode).

这篇关于Emacs版本24.4:击中RETURN时新的令人讨厌的缩进丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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