[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inhibit electric-pair-mode conditionally
From: |
Stefan Monnier |
Subject: |
Re: inhibit electric-pair-mode conditionally |
Date: |
Mon, 18 Apr 2016 11:42:03 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> Is there a way to disable electric-pair-mode conditionally?
How 'bout
electric-pair-inhibit-predicate is a variable defined in ‘elec-pair.el’.
Its value is ‘electric-pair-default-inhibit’
This variable may be risky if used as a file-local variable.
Documentation:
Predicate to prevent insertion of a matching pair.
The function is called with a single char (the opening char just inserted).
If it returns non-nil, then ‘electric-pair-mode’ will not insert a matching
closer.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 24.4 of Emacs.
[back]
-- Stefan