From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mohammed Sadik Newsgroups: gmane.emacs.devel Subject: inhibit electric-pair-mode conditionally Date: Mon, 18 Apr 2016 18:20:01 +0530 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1460992963 1110 80.91.229.3 (18 Apr 2016 15:22:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Apr 2016 15:22:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 18 17:22:30 2016 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 1asB0M-0002SO-U5 for ged-emacs-devel@m.gmane.org; Mon, 18 Apr 2016 17:22:27 +0200 Original-Received: from localhost ([::1]:39699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asB0M-00024P-Cy for ged-emacs-devel@m.gmane.org; Mon, 18 Apr 2016 11:22:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1as8dd-0002oJ-49 for emacs-devel@gnu.org; Mon, 18 Apr 2016 08:50:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1as8dZ-0003eJ-OL for emacs-devel@gnu.org; Mon, 18 Apr 2016 08:50:48 -0400 Original-Received: from md-77.webhostbox.net ([199.79.62.63]:39672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1as8dZ-0003PS-JL for emacs-devel@gnu.org; Mon, 18 Apr 2016 08:50:45 -0400 Original-Received: from mail-wm0-f54.google.com ([74.125.82.54]:37790) by md-77.webhostbox.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1as8cs-004LBb-K9 for emacs-devel@gnu.org; Mon, 18 Apr 2016 12:50:02 +0000 Original-Received: by mail-wm0-f54.google.com with SMTP id n3so122913601wmn.0 for ; Mon, 18 Apr 2016 05:50:03 -0700 (PDT) X-Gm-Message-State: AOPr4FUQI/7ZfQldseJMolg0/3ClECKhCVR+0epzrsRUP2i8gaC6AWB1Lf0iLCUFQBeVC8JyzPcExukM/aGAQQ== X-Received: by 10.194.74.231 with SMTP id x7mr34551683wjv.60.1460983801942; Mon, 18 Apr 2016 05:50:01 -0700 (PDT) Original-Received: by 10.194.74.227 with HTTP; Mon, 18 Apr 2016 05:50:01 -0700 (PDT) X-Gmail-Original-Message-ID: X-Authenticated_sender: sadiq@sadiqpk.org X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - md-77.webhostbox.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sadiqpk.org X-Get-Message-Sender-Via: md-77.webhostbox.net: authenticated_id: sadiq@sadiqpk.org X-Authenticated-Sender: md-77.webhostbox.net: sadiq@sadiqpk.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 199.79.62.63 X-Mailman-Approved-At: Mon, 18 Apr 2016 11:20:44 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:203049 Archived-At: Is there a way to disable electric-pair-mode conditionally? Say, I have to disable electric-pair on inserting '{', but if the char before '{' is not space. Actually, I have even more complicated situation to handle. It would be enough to connect some function to electric-pair (with hooks, or so), such that if the function returns nil, don't do completion, else do. Is it possible?