From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#17183: can't insert a quote pair before another Date: Sun, 6 Apr 2014 16:01:44 +0100 Message-ID: References: <87bnwf8czs.fsf@kitaj.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1396796605 14150 80.91.229.3 (6 Apr 2014 15:03:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Apr 2014 15:03:25 +0000 (UTC) Cc: 17183@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 06 17:03:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WWobM-0006JB-Lr for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Apr 2014 17:03:16 +0200 Original-Received: from localhost ([::1]:58326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWobM-0005TN-58 for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Apr 2014 11:03:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWobE-0005TC-Dy for bug-gnu-emacs@gnu.org; Sun, 06 Apr 2014 11:03:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WWob9-0003rb-D9 for bug-gnu-emacs@gnu.org; Sun, 06 Apr 2014 11:03:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWob9-0003rN-AI for bug-gnu-emacs@gnu.org; Sun, 06 Apr 2014 11:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WWob8-00006S-KY for bug-gnu-emacs@gnu.org; Sun, 06 Apr 2014 11:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Apr 2014 15:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17183 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17183-submit@debbugs.gnu.org id=B17183.1396796531325 (code B ref 17183); Sun, 06 Apr 2014 15:03:02 +0000 Original-Received: (at 17183) by debbugs.gnu.org; 6 Apr 2014 15:02:11 +0000 Original-Received: from localhost ([127.0.0.1]:38181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WWoaI-000056-3R for submit@debbugs.gnu.org; Sun, 06 Apr 2014 11:02:10 -0400 Original-Received: from mail-qc0-f178.google.com ([209.85.216.178]:50941) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WWoaD-00004s-42 for 17183@debbugs.gnu.org; Sun, 06 Apr 2014 11:02:05 -0400 Original-Received: by mail-qc0-f178.google.com with SMTP id i8so5339261qcq.23 for <17183@debbugs.gnu.org>; Sun, 06 Apr 2014 08:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=3FhU0twfMDVWp9PTWriO/uKqpZlHjMW2L99BkdyTX5E=; b=YIRfu0nbv6zCF//DMh7eWDrcG/APmC1gr06Cdt1mqPfPbwOv8zC2pvmuM9g+K9RZ1J jZogff5CSA8R0Ta+AXSQrSM1XaDu5pR9F1Vty5SItG5r4oqfhA+kt7Zong8UQ+cRANDP vMvwhxdRCdbT1qYw5Jp3lBBDIxp6LWYATU/JmruX9hf3bSkiP0H2/CLdHxVT43BgAXpi IVgWm/cT/bbex6CbYnNhi6AiYualbLKYis0A5i8d8dfr0mx40K3mDleQu0G6KAlYMwSC S3fAOLmBYwOcqpeKSjMUvNjSFaLM0Y6/VtvG5ZC2C5brg6kHSGUsQOVh7PKW8rTw6Lwc YmJA== X-Received: by 10.140.105.118 with SMTP id b109mr15016617qgf.28.1396796524461; Sun, 06 Apr 2014 08:02:04 -0700 (PDT) Original-Received: by 10.229.46.199 with HTTP; Sun, 6 Apr 2014 08:01:44 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87799 Archived-At: That's precisely what I proposed in my last message that didn't yet make it to you (gmane authorization). Also, we should probably use electric-pair--syntax-ppss so that the trick works inside comments, too. On Sun, Apr 6, 2014 at 1:39 PM, Stefan Monnier w= rote: >> + (unwind-protect >> + (progn >> + (delete-char -1) >> + (not (nth 3 (syntax-ppss)))) >> + (insert-char char))) > > Yuck! Why not (save-excursion (not (nth 3 (syntax-ppss (-1 (point))))))? > > > Stefan --=20 Jo=E3o T=E1vora