I was looking into abbrev.el to figure out how to code up a change I wanted to make (having undo undo the abbrev expansion without undoing the self-insert-command that triggered the expansion), when I realized to my surprise that abbrev is actually baked into the Emacs C core. This defies common sense: why can't abbrev.el be a standalone module that uses post-self-insert-hook or post-command-hook? I realize we're not supposed to use hooks to communicate between components that are part of GNU Emacs, but the alternative in this case seems unnecessarily invasive. (By the way: the comment in front of self-insert-command is no longer valid; ISTR that dubious optimization was removed a while ago.) === modified file 'src/cmds.c' --- src/cmds.c 2011-01-26 08:36:39 +0000 +++ src/cmds.c 2011-02-27 03:02:04 +0000 @@ -263,8 +263,6 @@ static int nonundocount; -/* Note that there's code in command_loop_1 which typically avoids - calling this. */ DEFUN ("self-insert-command", Fself_insert_command, Sself_insert_command, 1, 1, "p", doc: /* Insert the character you type. Whichever character you type to run this command is inserted.