From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Re: [kbrint@hamachi.rufus.net: cperl-mode problem under emacs 22.1] Date: Fri, 17 Aug 2007 16:04:02 -0300 Message-ID: <46C5F122.9090302@ig.com.br> References: <18107.43470.539959.124188@rgrjr.dyndns.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1187377345 24728 80.91.229.12 (17 Aug 2007 19:02:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2007 19:02:25 +0000 (UTC) Cc: Bob Rogers , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 17 21:02:19 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IM75P-0002wi-G7 for ged-emacs-devel@m.gmane.org; Fri, 17 Aug 2007 21:02:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IM75P-0002we-2Z for ged-emacs-devel@m.gmane.org; Fri, 17 Aug 2007 15:02:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IM75M-0002wX-0n for emacs-devel@gnu.org; Fri, 17 Aug 2007 15:02:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IM75K-0002wK-6V for emacs-devel@gnu.org; Fri, 17 Aug 2007 15:02:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IM75K-0002wG-2V for emacs-devel@gnu.org; Fri, 17 Aug 2007 15:02:14 -0400 Original-Received: from ag-out-0708.google.com ([72.14.246.251]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IM75J-0000yv-K7 for emacs-devel@gnu.org; Fri, 17 Aug 2007 15:02:13 -0400 Original-Received: by ag-out-0708.google.com with SMTP id 35so621002aga for ; Fri, 17 Aug 2007 12:02:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=LVCGNtGzRY19xHXgZ823FWLPrYBoBO758Mas/AuxcVI1BUvfsOYeRuzrQMX8/InoKkvWmdGehZL3/2xVIVI5WT6PejT//D5gawd1oopHfJ30s6z06glr7oPXklZWhFX9RJYA3D4GwuLw+iLzr/92+RA236Azx4b2HP7rWABIkHI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=B2IVAP7bd82vV8DeC9YPNwdxxBfIjqR/4b5k226K82mY3vAJ9nI0RDQG7pr34RidUEaqYfvs3jbd1cajXr2cFDRRpPizqy70k2nD2qK3/6U6Jf+CimcscVVHDt9S78uD1ki68orikzvnHmmGZrmgbMZhFSSZqyoIS7E+hB61WJQ= Original-Received: by 10.90.78.9 with SMTP id a9mr5116106agb.1187377332400; Fri, 17 Aug 2007 12:02:12 -0700 (PDT) Original-Received: from ?201.82.139.153? ( [201.82.139.153]) by mx.google.com with ESMTPS id 5sm4229437agc.2007.08.17.12.02.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 17 Aug 2007 12:02:10 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 In-Reply-To: X-Detected-Kernel: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76697 Archived-At: Richard Stallman wrote: > Does anyone see any problem with Bob's patch? > The patch fix an error when typing an expression like s{a}{b} at end of buffer. I've just installed the patch in trunk and Emacs 22 branch. > Date: Thu, 9 Aug 2007 19:57:02 -0400 > From: Bob Rogers > To: rms@gnu.org, emacs-devel@gnu.org > Subject: [kbrint@hamachi.rufus.net: cperl-mode problem under emacs 22.1] > In-Reply-To: > > From: Richard Stallman > Date: Wed, 08 Aug 2007 00:54:51 -0400 > > Would someone please try to DTRT, then ack? Sometimes these problems > are impossible to fix, or impossible without creating worse problems. > But it would be good to try it and see, before giving up. > > ------- Start of forwarded message ------- > X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY > autolearn=failed version=3.1.0 > From: kevin brintnall > To: bug-gnu-emacs@gnu.org > Date: Tue, 7 Aug 2007 10:13:55 -0500 (CDT) > Subject: cperl-mode problem under emacs 22.1 > > emacs -q > C-x C-f file.pl > M-x cperl-mode > > Type into buffer: > > $k =~ s{a}{b}; > ^ the second open brace will fail to insert, generating message: > Args out of range: 14, 15 > > This is with the built-in cperl-mode 5.22 in Emacs 22.1. > > This does not happen with emacs 21.x or 20.x. > > The second hunk of the following patch seems to fix (or at least paper > over) this problem. While testing, I found a similar problem: If you > put > > { > } > > into an empty cperl-mode buffer and then try to change it to > > { > $k =~ s{a}{b}; > } > > cperl-find-pods-heres dies in a *different* place when you type the > *first* "{". This is addressed by the first hunk. > > Needless to say, I do not have a whole lot of confidence in these > band-aids; cperl-find-pods-heres is 1122 lines long, and I do not even > begin to understand it. Take it FWIW. > > ################################### > > With cperl-mode 5.23 form ilya, I can type the {}'s, but the following > error is generated instead: > > End of `s{ ... }{ ... }' string/RE not found: (scan-error Unbalanced parentheses 11 13) > > This causes fontification to fail. > > I can confirm this, but have no further insights. > > -- Bob Rogers > http://rgrjr.dyndns.org/ > > ------------------------------------------------------------------------ > Index: lisp/progmodes/cperl-mode.el > =================================================================== > RCS file: /sources/emacs/emacs/lisp/progmodes/cperl-mode.el,v > retrieving revision 1.89 > diff -c -r1.89 cperl-mode.el > *** lisp/progmodes/cperl-mode.el 16 Apr 2007 07:05:28 -0000 1.89 > --- lisp/progmodes/cperl-mode.el 9 Aug 2007 23:46:22 -0000 > *************** > *** 3729,3736 **** > (set-syntax-table reset-st)))) > > (defsubst cperl-look-at-leading-count (is-x-REx e) > ! (if (re-search-forward (concat "\\=" (if is-x-REx "[ \t\n]*" "") "[{?+*]") > ! (1- e) t) ; return nil on failure, no moving > (if (eq ?\{ (preceding-char)) nil > (cperl-postpone-fontification > (1- (point)) (point) > --- 3729,3739 ---- > (set-syntax-table reset-st)))) > > (defsubst cperl-look-at-leading-count (is-x-REx e) > ! (if (and (> (point) e) > ! ;; return nil on failure, no moving > ! (re-search-forward (concat "\\=" > ! (if is-x-REx "[ \t\n]*" "") "[{?+*]") > ! (1- e) t)) > (if (eq ?\{ (preceding-char)) nil > (cperl-postpone-fontification > (1- (point)) (point) > *************** > *** 4778,4784 **** > (progn > (cperl-postpone-fontification > (1- e1) e1 'face my-cperl-delimiters-face) > ! (if (assoc (char-after b) cperl-starters) > (progn > (cperl-postpone-fontification > b1 (1+ b1) 'face my-cperl-delimiters-face) > --- 4781,4788 ---- > (progn > (cperl-postpone-fontification > (1- e1) e1 'face my-cperl-delimiters-face) > ! (if (and (not (eobp)) > ! (assoc (char-after b) cperl-starters)) > (progn > (cperl-postpone-fontification > b1 (1+ b1) 'face my-cperl-delimiters-face) >