The attached patch fixes the situation where a function `chomp' exists and `electric-pair-skip-whitespace' has the value `chomp'. Since that specific symbol is mentioned as a special case for this variable, it seems that it shouldn't try to call a function named as such. Basically, defining a function named `chomp' will break electric pairing if the `electric-pair-skip-whitespace' is set to chomp.