Subject: bug#11520: Workaround

From: Simon Law <[email-masked]>
Date: Sat, 19 May 2012 18:41:23 -0400

I use the following defadvice as a hack to workaround this bug:

(defadvice delete-active-region (around electric-pair-or-delete-active-region
                                        activate)
  "Prevent delete-active-region from clobbering electric-pair-mode."
  (unless (and electric-pair-mode
               (or (eq ?\( (char-syntax last-command-event))
                   (assq last-command-event electric-pair-pairs)))
    ad-do-it)
  t)