"123", -6ren">
gpt4 book ai didi

perl - 为什么 emacs 在散列中的数组之后奇怪地对齐?

转载 作者:行者123 更新时间:2023-12-02 00:36:21 25 4
gpt4 key购买 nike

如果我让 emacs 24.1.1 缩进以下内容

$config = {
b => [
"123",
],
c => "123",
};

然后它将把它变成

$config = {
b => [
"123",
],
c => "123",
};

问题

为什么它不缩进以使 bc 对齐?

更新

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com