On Thu, Jul 4, 2019 at 8:01 PM Alan Mackenzie <
address@hidden> wrote:
> + ;; Prepare for the use of `electric-pair-mode':
> + (eval-after-load "elec-pair"
> + '(when (and (boundp 'electric-pair-inhibit-predicate)
> + (fboundp 'electric-pair-cc-inhibit-predicate))
> + (make-local-variable 'electric-pair-inhibit-predicate)
> + (setq electric-pair-inhibit-predicate
> + #'electric-pair-cc-inhibit-predicate)))
>
What you are doing here is perfectly legal. I designed the
electric-pair-inhibit-predicate variable to be external to users and
other modes, presuming those users know what they are doing.
You can use add-function or setq the variable directly. I prefer
the former, but it's probably not available in emacs 24. It's
your choice.
The function you put there shouldn't be in the elec-pair.el
library, so I suggest you put it in cc-mode.el or wherever you
feel it fits. It'll probably save you that fboundp check.
Naturally, this doesn't fix the C-M-* navigation in multi-line
strings (as you know, if that were fixed, you woundn't need
this tweak)
João