Mercurial > hg > xemacs-beta
diff src/abbrev.c @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 74fd4e045ea6 |
children |
line wrap: on
line diff
--- a/src/abbrev.c Mon Aug 13 11:19:22 2007 +0200 +++ b/src/abbrev.c Mon Aug 13 11:20:41 2007 +0200 @@ -77,9 +77,9 @@ struct abbrev_match_mapper_closure { struct buffer *buf; - Lisp_Char_Table *chartab; + struct Lisp_Char_Table *chartab; Charcount point, maxlen; - Lisp_Symbol *found; + struct Lisp_Symbol *found; }; /* For use by abbrev_match(): Match SYMBOL's name against buffer text @@ -91,8 +91,8 @@ struct abbrev_match_mapper_closure *closure = (struct abbrev_match_mapper_closure *)arg; Charcount abbrev_length; - Lisp_Symbol *sym = XSYMBOL (symbol); - Lisp_String *abbrev; + struct Lisp_Symbol *sym = XSYMBOL (symbol); + struct Lisp_String *abbrev; /* symbol_value should be OK here, because abbrevs are not expected to contain any SYMBOL_MAGIC stuff. */ @@ -147,7 +147,7 @@ /* Match the buffer text against names of symbols in obarray. Returns the matching symbol, or 0 if not found. */ -static Lisp_Symbol * +static struct Lisp_Symbol * abbrev_match (struct buffer *buf, Lisp_Object obarray) { struct abbrev_match_mapper_closure closure; @@ -175,7 +175,7 @@ This speed difference should be unnoticeable, though. I have tested the degenerated cases of thousands of abbrevs being defined, and abbrev_match() was still fast enough for normal operation. */ -static Lisp_Symbol * +static struct Lisp_Symbol * abbrev_oblookup (struct buffer *buf, Lisp_Object obarray) { Bufpos wordstart, wordend; @@ -222,11 +222,10 @@ because of consistency with abbrev_match. */ if (wordend < point) return 0; + if (wordend <= wordstart) + return 0; } - if (wordend <= wordstart) - return 0; - p = word = (Bufbyte *) alloca (MAX_EMCHAR_LEN * (wordend - wordstart)); for (idx = wordstart; idx < wordend; idx++) { @@ -282,10 +281,10 @@ Bufpos point; /* position of point */ Bufpos abbrev_start; /* position of abbreviation beginning */ - Lisp_Symbol *(*fun) (struct buffer *, Lisp_Object); + struct Lisp_Symbol *(*fun) (struct buffer *, Lisp_Object); - Lisp_Symbol *abbrev_symbol; - Lisp_String *abbrev_string; + struct Lisp_Symbol *abbrev_symbol; + struct Lisp_String *abbrev_string; Lisp_Object expansion, count, hook; Charcount abbrev_length; int lccount, uccount;