From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.bugs Subject: bug#3943: 23.0.96; CPerl-mode is too electric Date: Tue, 18 Aug 2009 09:13:40 -0700 Message-ID: <20090818161340.GA10453@powdermilk.math.berkeley.edu> References: <87prax1wvs.fsf@cyd.mit.edu> <20090816050854.GA516@powdermilk.math.berkeley.edu> <87skfr9wbc.fsf@cyd.mit.edu> Reply-To: Ilya Zakharevich , 3943@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250802785 10779 80.91.229.12 (20 Aug 2009 21:13:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Aug 2009 21:13:05 +0000 (UTC) Cc: 3943@emacsbugs.donarmstrong.com To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 20 23:12:57 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MeEwK-0004nK-Ug for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Aug 2009 23:12:57 +0200 Original-Received: from localhost ([127.0.0.1]:37003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeEwJ-0003q2-QG for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Aug 2009 17:12:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeEuP-0001fF-5u for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2009 17:10:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeEuJ-0001Vb-RJ for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2009 17:10:56 -0400 Original-Received: from [199.232.76.173] (port=55436 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeEuJ-0001VI-KY for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2009 17:10:51 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52315) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MeEuJ-0007El-2O for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2009 17:10:51 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7KKkpo8019227; Thu, 20 Aug 2009 13:48:02 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7KKFt74013025; Thu, 20 Aug 2009 13:15:55 -0700 Resent-Date: Thu, 20 Aug 2009 13:15:55 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Ilya Zakharevich Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 20 Aug 2009 20:15:53 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3943 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3943-submit@emacsbugs.donarmstrong.com id=B3943.125061203125095 (code B ref 3943); Thu, 20 Aug 2009 20:15:53 +0000 Original-Received: (at 3943) by emacsbugs.donarmstrong.com; 18 Aug 2009 16:13:51 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from n20.bullet.mail.mud.yahoo.com (n20.bullet.mail.mud.yahoo.com [68.142.206.147]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n7IGDn75025089 for <3943@emacsbugs.donarmstrong.com>; Tue, 18 Aug 2009 09:13:50 -0700 Original-Received: from [68.142.200.224] by n20.bullet.mail.mud.yahoo.com with NNFMP; 18 Aug 2009 16:13:44 -0000 Original-Received: from [68.142.201.73] by t5.bullet.mud.yahoo.com with NNFMP; 18 Aug 2009 16:13:44 -0000 Original-Received: from [127.0.0.1] by omp425.mail.mud.yahoo.com with NNFMP; 18 Aug 2009 16:13:44 -0000 X-Yahoo-Newman-Id: 186953.98615.bm@omp425.mail.mud.yahoo.com Original-Received: (qmail 76113 invoked from network); 18 Aug 2009 16:13:43 -0000 Original-Received: from unknown (HELO localhost.localdomain) (nospam-abuse@128.32.238.142 with login) by smtp127.plus.mail.sp1.yahoo.com with SMTP; 18 Aug 2009 16:13:43 -0000 X-Yahoo-SMTP: AD9vPiOswBAfjahpvlJUrZlCf4SMv_NrfrpTOV8a7nc- X-YMail-OSG: R08dzNcVM1mEm0pHz8hUrS0CVhdp7tdUnDxNAwbzv9XyfyBoC.snmG.N.wu3WsL66UJWrUFwQBQso_VRxvl6QOloqaT5Y8BF6k_mKzyYH53XwiF7CbEm7acPnp_lm0x8eMsJr9jiJZAharOK1G1_aPlSh6yOf3qF8HkqFk4L1qvmS01obq0QDcfS_3FSzwixsEF9pnM2v5U4SpUNRe3wrU..Uqg_AKEr.wQBzaj8D0MFLwaI7KvrRxWKutKY50UpWxnvBV7TBjn8pytC X-Yahoo-Newman-Property: ymail-3 Content-Disposition: inline In-Reply-To: <87skfr9wbc.fsf@cyd.mit.edu> User-Agent: Mutt/1.4.2.1i X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 20 Aug 2009 17:10:56 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30357 Archived-At: 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