如果我让 emacs 24.1.1 缩进以下内容
$config = {
b => [
"123",
],
c => "123",
};
然后它将把它变成
$config = {
b => [
"123",
],
c => "123",
};
问题
为什么它不缩进以使 b
和 c
对齐?
更新
Enabled minor modes: Auto-Composition Auto-Compression Auto-Encryption
File-Name-Shadow Font-Lock Global-Font-Lock Line-Number Menu-Bar
Transient-Mark
(Information about these minor modes follows the major mode info.)
Perl mode defined in `perl-mode.el':
Major mode for editing Perl code.
最佳答案
因为缩进算法不理解这种情况。
我刚刚安装了 perl-mode.el 的补丁(在 Emacs 的主干中,即不会出现在即将推出的 Emacs-24.4 中,而只会出现在 Emacs-24.5 中),这似乎可以修复它。您可以在 http://bzr.savannah.gnu.org/lh/emacs/trunk/annotate/head:/lisp/progmodes/perl-mode.el 尝试新代码.
关于perl - 为什么 emacs 在散列中的数组之后奇怪地对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24632654/