* lisp/electric.el (electric-indent-post-self-insert-function): Check that
electric-indent-mode is enabled in current buffer.
Reduce use of (require 'cl).
* admin/bzrmerge.el: Use cl-lib.
* leim/quail/hangul.el: Don't require CL.
* leim/quail/ipa.el: Use cl-lib.
* vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el:
* vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el:
* register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el:
* msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el:
* international/quail.el, info-xref.el, imenu.el, image-mode.el:
* font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el:
* battery.el, avoid.el, abbrev.el: Use cl-lib.
* vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el:
* vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el:
* jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el:
* emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el:
* calculator.el, autorevert.el, apropos.el: Don't require CL.
* emacs-bytecomp.el (byte-recompile-directory, display-call-tree)
(byte-compile-unfold-bcf, byte-compile-check-variable):
* emacs-byte-opt.el (byte-compile-trueconstp)
(byte-compile-nilconstp):
* emacs-autoload.el (make-autoload): Use pcase.
* face-remap.el (text-scale-adjust): Simplify pcase patterns.
Fix electric-pair-mode/delete-selection-mode interaction.

* lisp/electric.el (electric-pair-post-self-insert-function): Fix pair
insertion in empty-region case.
* lisp/delsel.el (delete-selection-helper): New function, extracted from
delete-selection-pre-hook.
(delete-selection-pre-hook): Use it.
(delete-selection-self-insert-function): New function.
(delete-selection-self-insert-hooks): New hook.
(self-insert-command, self-insert-iso): Use it.
* lisp/electric.el (electric-pair-syntax): New function, extracted from
electric-pair-post-self-insert-function.
(electric-pair-post-self-insert-function): Use it.
(electric-pair-delete-selection-self-insert-function): New function.
(electric-pair-mode): Require delsel and setup
delete-selection-self-insert-hooks.
Rework the last delsel/electric fix.
* lisp/delsel.el (delete-selection-helper): Use a function instead of a hook.
(delete-selection-pre-hook): Use use-region-p.
(delete-selection-self-insert-function): Remove.
(self-insert-command): Obey self-insert-uses-region-functions.
(self-insert-iso): Revert to previous setting, since we don't actually
know what that command does.
(delete-selection-self-insert-hooks): Remove.
* lisp/electric.el (electric-pair-delete-selection-self-insert-function):
Rename to electric-pair-will-use-region, return a boolean.
(electric-pair-mode): Adjust accordingly.  Don't require delsel.
Update copyright notices for 2013.