1

I've been using cperl-mode in Emacs for some time. On a new system, I've been getting a problematic behaviour: when I type something like "if", Emacs expands it into a full-blown statement, so it'll automatically give me

if () {
}

This is really distracting. Setting cperl-electric-keywords to nil doesn't change this behaviour. I already have cperl-hairy set to nil.

I see there was discussion of this on Perl Monks here http://www.perlmonks.org/?node_id=864654 , and it does work, as suggested there, to say cperl-toggle-abbrev, or to use the menu Perl -> Toggle -> Electric Keywords. But I want this behaviour to be permanent, and putting (setq cperl-electric-keywords nil) into my .emacs doesn't work.

How can I modify my .emacs to handle this?

user1235777
  • 609
  • 7
  • 24
  • Not familiar with these functions/variables, but can you just put `(cperl-toggle-abbrev)` in your .emacs file? If that function works interactively, you should be able to put it in your .emacs. Might need an arg after the function name, if it requires one. – jimtut Sep 05 '14 at 16:26
  • Please try to reproduce this in `emacs -Q`. It sounds like a configuration issue. – ChrisGPT was on strike Sep 05 '14 at 18:48
  • Thanks, Chris. When I launch with emacs -Q, the behaviour does not occur. However, to reiterate, in my usual setup, even when cperl-electric-keywords is nil, I still see the behaviour. That is, it doesn't seem to be just an issue with my configuration files--I can be in a file in cperl-mode, check the value of cperl-electric-keywords, see that it's nil, and type "if ", and still get the entire framework pop up. I don't know the difference between this, and what happens under emacs -Q. Thanks. – user1235777 Sep 08 '14 at 13:52

0 Answers0