--- ./lisp/expand.el.fred Fri Jan 29 15:12:00 1999 +++ ./lisp/expand.el Mon Dec 20 07:32:00 1999 @@ -364,8 +364,9 @@ expand-pos (expand-list-to-markers expand-list) expand-list nil))) (run-hooks 'expand-expand-hook) - t)))) - ) + t) + nil)) + nil)) (defun expand-do-expansion () (delete-backward-char (length last-abbrev-text)) --- ./src/abbrev.c.fred Tue May 18 06:38:03 1999 +++ ./src/abbrev.c Mon Dec 20 07:30:44 1999 @@ -365,8 +365,15 @@ hook = XSYMBOL (sym)->function; if (!NILP (hook)) - call0 (hook); - + { + /* If the expansion is a special one, use the return value from the hook + to know if the expansion happened. */ + if (!NILP(call0 (hook)) || STRINGP(expansion)) + return value; + else + return Qnil; + } + return value; }