all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Andrea Greselin <greselin.andrea@gmail.com>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: How to control pairing of quotes in text-mode with electric-pair-mode?
Date: Thu, 11 Jul 2019 07:22:17 -0400	[thread overview]
Message-ID: <CAM-tV--kBVd3b_b2xRqnoxVdQFQ8At2OGCL6A4o7xfKBih78Xw@mail.gmail.com> (raw)
In-Reply-To: <CAJ_oJbY9Ru28=Et3Kp9+xnVDFw8QjjFc9k6sTzaqDfNsJ2XH5Q@mail.gmail.com>

On Fri, 5 Jul 2019 at 08:43, Andrea Greselin <greselin.andrea@gmail.com> 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.



  reply	other threads:[~2019-07-11 11:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05  9:40 How to control pairing of quotes in text-mode with electric-pair-mode? Andrea Greselin
2019-07-11 11:22 ` Noam Postavsky [this message]
2019-07-12 16:35   ` Andrea Greselin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM-tV--kBVd3b_b2xRqnoxVdQFQ8At2OGCL6A4o7xfKBih78Xw@mail.gmail.com \
    --to=npostavs@gmail.com \
    --cc=greselin.andrea@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.