GNU bug report logs - #3943
23.0.96; CPerl-mode is too electric

Previous Next

Package: emacs;

Reported by: "Rommerskirchen, Heinrich (NSN - DE/Munich)" <heinrich.rommerskirchen <at> nsn.com>

Date: Mon, 27 Jul 2009 13:30:04 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #45 received at 3943 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Ilya Zakharevich <nospam-abuse <at> ilyaz.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 3943 <at> debbugs.gnu.org
Subject: Re: 23.0.96; CPerl-mode is too electric
Date: Tue, 18 Aug 2009 09:13:40 -0700
On Sun, Aug 16, 2009 at 07:24:23PM -0400, Chong Yidong wrote:
> The problem exists in upstream CPerl as well.  The bug arises from line
> 3763 (cperl-electric-paren):
> 
>   (if (eq last-command-char ?<)
>       (progn
>         (and abbrev-mode ; later it is too late, may be after `for'
>              (expand-abbrev))
>         (cperl-after-expr-p nil "{;(,:="))
>     1))
> 
> Because one abbrev expansion already takes place when typing "while ",
> this code leads to another, extra expansion.  Removing the
> (and abbrev-mode...) expression fixes the problem.

The bug report does not contain the way to reproduce the problem.
From your description, I presume that it is typing

  while<

which leads to a double expansion.

Then it is an incompatible change in Emacs after v21 (which I can test
with).  I would much prefer code without explicit version-checking
(especially since there are a few independent branches); for this I
need a way to determine whether I'm inside `expand-abbrev'.

Is there a way to detect this?

Thanks,
Ilya




This bug report was last modified 15 years and 205 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.