cperl-mode

Syntax highlight for perl in Emacs is broken, is there a fix?

大兔子大兔子 提交于 2020-01-01 12:07:11
问题 I'm a perl programmer and a new emacs user. I'm under Windows, using cperl-mode for editing perl. Emacs version is 24.2.1. Here's a screenshot with some sample code: (source: breqwas.net) Obvious bug: it highlights arrays, hashes and non-quoted literal values in ( a => "b" ) style lists inside comments One more bug: it highligts the first word in a regular expression as an array because of non-default quote symbol Not a bug, but looks weird: it highlights arrays and hashes any time when they

How do I adjust cperl mode indentation in Emacs to match Moose examples?

狂风中的少年 提交于 2019-12-10 13:26:09
问题 How can I set up cperl mode in Emacs so that the indentation after brackets, e.g. has 'name' => ( is => 'rw', isa => 'Str', required => 1, ); (default indentation) becomes more like that seen in, for example, the Moose manual, e.g. has 'password' => ( is => 'rw', isa => 'Str', ); ? 回答1: I found the answer on the Emacs Wiki. Add the following to .emacs: (custom-set-variables '(cperl-indent-parens-as-block t)) 来源: https://stackoverflow.com/questions/3155468/how-do-i-adjust-cperl-mode

Emacs cperl - indentation in constant block

独自空忆成欢 提交于 2019-12-07 01:45:16
问题 I'm running Aquamacs 3.0a based on GNU Emacs 24.3.50.2. cperl-version is 6.2. When I edit a Perl constant block I get extra indentation that I don't want:- use constant { ONE => 1, TWO => 2, THREE => 3, }; What I want is this:- use constant { ONE => 1, TWO => 2, THREE => 3, }; The problem seems to be that cperl-continued-statement-offset is being added because we're inside a block and there's no semicolon at the end of the previous line. Is there a way to tell cperl to indent constant blocks

Emacs cperl - indentation in constant block

有些话、适合烂在心里 提交于 2019-12-05 06:29:19
I'm running Aquamacs 3.0a based on GNU Emacs 24.3.50.2. cperl-version is 6.2. When I edit a Perl constant block I get extra indentation that I don't want:- use constant { ONE => 1, TWO => 2, THREE => 3, }; What I want is this:- use constant { ONE => 1, TWO => 2, THREE => 3, }; The problem seems to be that cperl-continued-statement-offset is being added because we're inside a block and there's no semicolon at the end of the previous line. Is there a way to tell cperl to indent constant blocks using "parens" rules? I did try tweaking cperl-indent-parens-as-block, but that didn't help. I'm not

Syntax highlight for perl in Emacs is broken, is there a fix?

独自空忆成欢 提交于 2019-12-04 12:49:29
I'm a perl programmer and a new emacs user. I'm under Windows, using cperl-mode for editing perl. Emacs version is 24.2.1. Here's a screenshot with some sample code: (source: breqwas.net ) Obvious bug: it highlights arrays, hashes and non-quoted literal values in ( a => "b" ) style lists inside comments One more bug: it highligts the first word in a regular expression as an array because of non-default quote symbol Not a bug, but looks weird: it highlights arrays and hashes any time when they are used (even in comments, huh), but scalars are highlighted only when declared Not a bug, but looks

Can I use cperl-mode with perl-mode colorization?

寵の児 提交于 2019-12-03 07:42:05
The Emacs cperl-mode seems to get confused less than perl-mode, but the Skittles effect makes the thing unusable for me. Does anyone have or know of an example of a .emacs block that causes cperl-mode to use the colorization from perl-mode, ideally in a form readable enough that I can go back and turn back on the default colors one element at a time until I reach something I'm comfortable with? In particular there is a hideously shade of light green used for some builtins that I find quite unreadable, and I prefer my variables to not have the leading $ and $$ and such tinted red along with the