From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Newsgroups: gmane.emacs.devel Subject: Re: Emacs pretest -- electric-pair-mode change Date: Sat, 05 Apr 2014 00:31:56 +0100 Message-ID: <87d2gwk6xf.fsf@kitaj.lan> References: <87d2h0ujls.fsf_-_@kitaj.lan> <87sipujhq2.fsf@kitaj.lan> <87mwg1jz43.fsf@kitaj.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1396654342 15518 80.91.229.3 (4 Apr 2014 23:32:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Apr 2014 23:32:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 05 01:32:16 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WWDap-0006Gh-R5 for ged-emacs-devel@m.gmane.org; Sat, 05 Apr 2014 01:32:15 +0200 Original-Received: from localhost ([::1]:52542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWDap-00008G-En for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2014 19:32:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWDah-000085-Cr for emacs-devel@gnu.org; Fri, 04 Apr 2014 19:32:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WWDab-0007GF-V1 for emacs-devel@gnu.org; Fri, 04 Apr 2014 19:32:07 -0400 Original-Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:47808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWDab-0007G7-OR for emacs-devel@gnu.org; Fri, 04 Apr 2014 19:32:01 -0400 Original-Received: by mail-wg0-f46.google.com with SMTP id b13so4133717wgh.17 for ; Fri, 04 Apr 2014 16:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:content-transfer-encoding; bh=0Rmp7rAXyaZpqyhuwzVpKjiGFvWob2p2w6y0/7hJ5aI=; b=qnZzD21SYRLw8BOYUy9O8UuGxw3eN3EiNjegTayI5QtEQSxNo4lNo3Ir43h4iFz7kU P78qxRZihMVm1qphmIMeVHh7X2XLaLXpWT15a2dKLvxqHK+vxaEj8tHgY9LAuK9S65iY +G1SSBKSrLKWNdBtPzCrntoCPurz6GAWYUE1eqysWj01SjXKJJnLfDxNvCCxcOD9sQgq qv6nIaPUhpde3ABYygMZR+U4Et2BHoADJJzy4/nEA+jyBsWh2xjLrkgvbMF5mL8oZSJd XzfZXHefxX6ulGRkXkvu6fYQwNuzCWhkAJkdK0jX+VrgNzIR7AWavyJ3knN0zgIf7Lnh Aj8g== X-Received: by 10.180.149.143 with SMTP id ua15mr7968637wib.36.1396654320570; Fri, 04 Apr 2014 16:32:00 -0700 (PDT) Original-Received: from kitaj.lan.yourcompany.com (66.207.108.93.rev.vodafone.pt. [93.108.207.66]) by mx.google.com with ESMTPSA id co9sm14467645wjb.22.2014.04.04.16.31.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 04 Apr 2014 16:31:59 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 04 Apr 2014 08:53:23 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171313 Archived-At: Stefan Monnier writes: >> (if (nth 4 selector-ppss) ; in comment >> (let ((comment-start >> (progn >> (goto-char (line-beginning-positi= on)) > > Huh? Shouldn't this use (nth 8 (syntax-ppss))? Yes, that was a bad mistake. But in comments, we have to parse-partial-sexp from the comment block's start, not just from (nth 8 (syntax-ppss)), otherwise won't work in multi-line comment blocks. Though (nth 8 ...) that does play a part too (I guess that's what you meant)). So I changed the existing `electric-pair--syntax-ppss' helper to provide that. So I commited this to trunk, with two new tests for this behaviour in ruby line-comments and c block-style comments. Jo=C3=A3o