[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: invoke cper-mode instead of perl-mode
From: |
Harry Putnam |
Subject: |
Re: invoke cper-mode instead of perl-mode |
Date: |
Wed, 02 Jul 2003 08:40:40 -0700 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
robert.thorpe@antenova.com (Rob Thorpe) writes:
>> Still not getting abbrev-mode turned on when opening a perl script.
>> All other language modes seems to come up with abbrev-mode turned on.
>
>
> Ey, I haven't even got a variable called default-abbrev-mode, do you mean:
> (setq-default abbrev-mode t) ??
Ick, I posted again about this before I noticed you answer.
How strange... I've had this in emacs for ages:
(setq default-abbrev-mode t)
(read-abbrev-file)
It seems to work that way. But when I tried replacing it with your
formulation, abbrevs are not turned on.
I thought that was what was turning on abbrevs in sh, c, perl etc.
> There again line 1146 of cperl-mode.el says:
> (abbrev-mode (if (cperl-val 'cperl-electric-keywords) 1 0))
>
> So cperl-mode resets it internally. How irritating, this might be a bug.
Hmm, must have been some reason for it... But with that in there I
I guess the way is to set (setq cperl-electric-keywords t) then.
Maybe lots of people didn't like the electric features. So turned off
by default. I remember seeing complaints about it. I personally like
electic in cperl.
I found this in C-h m (in cperl mode):
[...]
CPerl mode provides expansion of the Perl control constructs:
if, else, elsif, unless, while, until, continue, do,
for, foreach, formy and foreachmy.
and POD directives (Disabled by default, see `cperl-electric-keywords'.)
[...]
So your answer got me straigntened out.... thanks.
I just tested with (setq cperl-electric-keywords t)
in emacs, and sure enough, cperl-mode started with abbrevs turned on.
I see now that turning on perl-hairy also makes abbrev mode enabled
on open of perl file.