Thanks forreporting that, Phil. Ituncovered several bugs in substitute-command-keys,some predating the curved-quote changes in Emacs 25. I installed a patch into Emacs master as commit 2791580f5eaa65948a13ea4ea4952d03b4da795b and am closing the bug as fixed. For Emacs 25 I propose installing the attached patch, which should avoid the emacs-goodies-el problem though it does not fix the other (presumably less-likely) bugs in this area. This patch is considerably simpler than what I just installed into master.