【发布时间】:2015-08-05 05:08:03
【问题描述】:
不与Emacs version 24.4: New obnoxious loss of indentation on hitting RETURN 重复
关闭electric-indent-mode 并不能解决我遇到的问题。请注意,该问题没有可接受的答案。
原问题:
目前在 Windows 7 上使用 Emacs 版本 24.5.1,C-j 的更改行为非常令人讨厌。我敢肯定设计师一定认为这是个好主意,但我不这么认为。
有没有办法从旧版本中恢复C-j 的行为?更具体地说,我正在考虑 v21.x(几年前在我的 Mac 上安装了它)。
说明:
这是我在旧版本中得到的(想象一下在每一行的末尾点击C-j:
Line 01: Some text.
Line 02: Some more text.
Line 03:
Line 04: Yet more text (notice the indentation stays the same despite
Line 05: the empty line in-between).
默认情况下,在 24.5.1 中,我得到(再次想象在每行末尾点击 C-j):
Line 01: Some text.
Line 02: Some more text.
Line 03:
Line 04: Yet more text (notice the indentation goes to zero because of
Line 05: the empty line in-between).
键绑定 C-j 在 Emacs 24.5.1 中运行 newline-and-indent。
【问题讨论】:
-
您是否有旧版本,您可以将函数复制到新的
.emacs文件中,然后将键盘快捷键更改为旧版本稍作修改的名称? -
@lawlist 我在上面添加了解释。希望这是可以理解的:-)。