From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.help Subject: Re: How to control pairing of quotes in text-mode with electric-pair-mode? Date: Thu, 11 Jul 2019 07:22:17 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="210900"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Help Gnu Emacs mailing list To: Andrea Greselin Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 11 13:22:47 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlX9y-000sjb-RQ for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Jul 2019 13:22:46 +0200 Original-Received: from localhost ([::1]:40612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlX9x-0005Cl-T2 for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Jul 2019 07:22:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60283) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlX9q-0005Cc-3M for help-gnu-emacs@gnu.org; Thu, 11 Jul 2019 07:22:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlX9p-0003wF-7Y for help-gnu-emacs@gnu.org; Thu, 11 Jul 2019 07:22:38 -0400 Original-Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]:33416) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlX9o-0003sl-Sw for help-gnu-emacs@gnu.org; Thu, 11 Jul 2019 07:22:37 -0400 Original-Received: by mail-oi1-x234.google.com with SMTP id u15so4206079oiv.0 for ; Thu, 11 Jul 2019 04:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HRsaM96N7KcnP/3gNJcuTgYmBB2Y1a+G9LV7v0q8YXM=; b=ZfSYzFi9eAVyuej+K99LRl4rWh9qnUjrZ0U4kxpjPyqKz0ikXfToLOQ6I0dCvVXkxk I4jLFhJQ07iuVVKkSFXd+QVusWCDmDoeku5XeOKcYz279/5amUNbKE4p4c/qNq3EsAaN +ppQvR9ziZvc772QshzLc1O4VZQzbEkl8TS+JfJwW39bywL5pHYQDtl4kRMED/RjHnQs h1EMSKrjVJa+4A0O4VW2tqIeJn74wpzctrR982nsWbpkb+wMmFJm8BLMoG9RCZ93S7GO ZJXyAQA4R2Rrcg7X3e82M9PRoGajOoNDL8eHwWYBKkthEHOEwdI9fp9NjpL3Ui/TS8xM qCzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HRsaM96N7KcnP/3gNJcuTgYmBB2Y1a+G9LV7v0q8YXM=; b=qcF+Rgd8lfF5gEjRHV4jgOUgULM81cMBNO9AbgL8NhBqWp7obayQuGgAihQqD3m3zQ JsSontnPSh2WKXKX3Q6KAl1Jtv97L1j5IZMGInAV+JYQU4R4Jp3i483pmPYo7iHzAVVh kAgP2iyfxB2Ptsc/LQWAHoZ53Cl4a3C7Qs8k3a49J1eIumvn2nJPmmtwm58DtV0ksXYp E0yKUXcaA9ysY+wB724igN0mqQCuDuy/SJnWSIB+Two1uH7/LjabzaMZEDNrtWVOga8N /1f1136gQa+ZlozydZwff9QtfSdcpyRBQnOJgMvyi+eaQMg+iztkHHTO38zlYFoh7MxT cWDw== X-Gm-Message-State: APjAAAWlDCdKDOn1rBST2B+B/KtRRwjKQnmF/Ko42rIjQkaL32Yewm9X xdQMH1gNMejJuwyOKYna1oaYM4AhzCqOgKOtsDs= X-Google-Smtp-Source: APXvYqzKgMk2MolGFC/eEQhvcsl9GkZpJrSTXbHhWRvvaYgW32Sl/775kqWQ3zMoYoOauuOtxddElrsLr7Cte+aFR3o= X-Received: by 2002:a05:6808:49a:: with SMTP id z26mr2020077oid.177.1562844153799; Thu, 11 Jul 2019 04:22:33 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::234 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121152 Archived-At: On Fri, 5 Jul 2019 at 08:43, Andrea Greselin wrote: > It works fine in 'emacs-lisp-mode' but it doesn't in 'text-mode': quotes > are still paired around words. I've noticed that it's the same with > 'electric-pair-inhibit-predicate' set to > 'electric-pair-conservative-inhibit', which should suppress pairing at the > beginning of words: in 'emacs-lisp-mode' both parentheses and quotes are > not paired at the beginning of words, but in 'text-mode' only parentheses > pairing is suppressed. Looks like the predicate is not considered when the character comes from electric-pair-pairs. In that case electric-pair-syntax-info returns t for UNCONDITIONAL, and electric-pair-post-self-insert-function doesn't call electric-pair-inhibit-predicate. So I guess this is not possible right now.