我从jrockway的cperl-mode存储库的最后一次提交中以cperl-mode 6.2在Windows上运行Emacs 26.3。
我对Emacs具有以下配置:
(setq-default tab-width 4)
(setq-default indent-tabs-mode nil)
(setq cperl-indent-level 4)
(setq cperl-indent-parens-as-block t)
(setq cperl-close-paren-offset -4)
(setq cperl-continued-statement-offset 4)
(setq cperl-tab-always-indent t)
(setq cperl-fix-hanging-brace-when-indent t)
(setq cperl-indent-subs-specially nil)
当我使用qw()初始化数组时,它给了我以下内容:
my @toto = qw(
toto
tutu
);
my @tutu = qw[
tata
titi
];
use constant CR => qw(
87800
76400
80200
81000
);
这不是我的指导原则,因为我遵循80个字符的规则...我不知道这是正常现象还是错误。我尝试了多种配置,查看了cperl的customize-group,但是找不到找到所需方法的方法。这是我想做的事情:
my @toto = qw(
toto
tutu
);
my @tutu = qw[
tata
titi
];
use constant CR => qw(
87800
76400
80200
81000
);
任何人都有想法或Elisp黑客可以做到这一点?
谢谢您的帮助:)
我刚刚向Emacs的master
分支推送了补丁,以修复qw
中perl-mode
的缩进。现在,它几乎可以像您想要的那样工作(结束括号除外)。例如:
my @tutu = qw[
tata
titi
];