Mercurial > emacs
comparison src/abbrev.c @ 1944:687179cefbe0
* abbrev.c (Fexpand_abbrev): Only copy the text we're going to
expand - from wordstart to wordend, not from wordstart to point -
into the buffer. There might be non-word text between wordend and
point.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 23 Feb 1993 14:17:11 +0000 |
parents | 94aa6a66e921 |
children | e94a593c3952 |
comparison
equal
deleted
inserted
replaced
1943:80482f2d54bf | 1944:687179cefbe0 |
---|---|
255 if (wordend <= wordstart) | 255 if (wordend <= wordstart) |
256 return value; | 256 return value; |
257 | 257 |
258 p = buffer = (char *) alloca (wordend - wordstart); | 258 p = buffer = (char *) alloca (wordend - wordstart); |
259 | 259 |
260 for (idx = wordstart; idx < point; idx++) | 260 for (idx = wordstart; idx < wordend; idx++) |
261 { | 261 { |
262 register int c = FETCH_CHAR (idx); | 262 register int c = FETCH_CHAR (idx); |
263 if (UPPERCASEP (c)) | 263 if (UPPERCASEP (c)) |
264 c = DOWNCASE (c), uccount++; | 264 c = DOWNCASE (c), uccount++; |
265 else if (! NOCASEP (c)) | 265 else if (! NOCASEP (c)) |