Mercurial > emacs
diff lispref/abbrevs.texi @ 89956:b9eee0a7bef5
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-25
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-459
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-463
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-464
Update from CVS: lisp/progmodes/make-mode.el: Fix comments.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-465
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 23 Jul 2004 04:30:44 +0000 |
parents | 548375b6b1f8 30845fb9e44d |
children | 3219f94257bc |
line wrap: on
line diff
--- a/lispref/abbrevs.texi Sat Jul 17 05:09:07 2004 +0000 +++ b/lispref/abbrevs.texi Fri Jul 23 04:30:44 2004 +0000 @@ -335,10 +335,9 @@ @end defvar The following sample code shows a simple use of -@code{pre-abbrev-expand-hook}. If the user terminates an abbrev with a -punctuation character, the hook function asks for confirmation. Thus, -this hook allows the user to decide whether to expand the abbrev, and -aborts expansion if it is not confirmed. +@code{pre-abbrev-expand-hook}. If the user terminates an abbrev with +a punctuation character, the hook function asks for confirmation. It +aborts expansion if the user does not confirm. @smallexample (add-hook 'pre-abbrev-expand-hook 'query-if-not-space) @@ -350,12 +349,10 @@ ;; @r{user entered some other character, this function asks whether} ;; @r{expansion should continue.} -;; @r{If the user answers the prompt with @kbd{y}, the function returns} -;; @r{@code{nil} (because of the @code{not} function), but that is} -;; @r{acceptable; the return value has no effect on expansion.} +;; @r{The function's return value makes no difference.} (defun query-if-not-space () - (if (/= ?\s (preceding-char)) + (if (/= ?\s last-command-char) (if (not (y-or-n-p "Do you want to expand this abbrev? ")) (error "Not expanding this abbrev")))) @end smallexample