Make electric-pair-mode, delete-selection-mode and CC Mode cooperate.
Fixes debbugs#21275. In Emacs >= 25, let electric-pair-mode take precedence over delete-selection-mode. delsel.el (delete-selection-uses-region-p): New function, previously a lambda expression in a property value for `self-insert-command'. (top-level) Set the `delete-selection' property of `self-insert-command' to `delete-selection-uses-region-p'. progmodes/cc-cmds.el (top-level): Give the `delete-selection' property for c-electric-\(brace\|paren\) the value `delete-selection-uses-region-p' when the latter function exists.
Showing with 23 additions and 7 deletions