From: Richard M. Stallman Date: Fri, 21 Jan 2000 02:22:56 +0000 (+0000) Subject: Comment change. X-Git-Tag: emacs-pretest-21.0.90~5303 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c87dbfd03c6bad52a4ed2254b7b7af880c5a9102;p=emacs.git Comment change. --- diff --git a/src/abbrev.c b/src/abbrev.c index f5586f5c4d7..ca97637a23a 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -367,11 +367,14 @@ Returns the abbrev symbol, if expansion took place.") { Lisp_Object expanded, prop; - /* If expanding an abbrev which has only a hook, and the hook - has a non-nil `no-self-insert' property, let the return value - of the hook specify whether an expansion took place. If it - returns nil, no expansion has been done. */ + /* If the abbrev has a hook function, run it. */ expanded = call0 (hook); + + /* In addition, if the hook function is a symbol with a a + non-nil `no-self-insert' property, let the value it returned + specify whether we consider that an expansion took place. If + it returns nil, no expansion has been done. */ + if (SYMBOLP (hook) && NILP (expanded) && (prop = Fget (hook, intern ("no-self-insert")), diff --git a/src/cmds.c b/src/cmds.c index 27d6812d05f..f2688656600 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -443,7 +443,7 @@ internal_self_insert (c, noautofill) sym = Fexpand_abbrev (); - /* If we expanded an abbrev which has only a hook, + /* If we expanded an abbrev which has a hook, and the hook has a non-nil `no-self-insert' property, return right away--don't really self-insert. */ if (! NILP (sym) && ! NILP (XSYMBOL (sym)->function)