diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/abbrev.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/abbrev.c b/src/abbrev.c index 0412a062bcf..e3f1faf36ee 100644 --- a/src/abbrev.c +++ b/src/abbrev.c | |||
| @@ -308,10 +308,16 @@ Returns t if expansion took place.") | |||
| 308 | else if (uccount) | 308 | else if (uccount) |
| 309 | { | 309 | { |
| 310 | /* Abbrev included some caps. Cap first initial of expansion */ | 310 | /* Abbrev included some caps. Cap first initial of expansion */ |
| 311 | idx = point; | 311 | int old_zv = ZV; |
| 312 | int old_pt = point; | ||
| 313 | |||
| 314 | /* Don't let Fcapitalize_word operate on text after point. */ | ||
| 315 | ZV = point; | ||
| 312 | SET_PT (wordstart); | 316 | SET_PT (wordstart); |
| 313 | Fcapitalize_word (make_number (1)); | 317 | Fcapitalize_word (make_number (1)); |
| 314 | SET_PT (idx); | 318 | |
| 319 | SET_PT (old_pt); | ||
| 320 | ZV = old_zv; | ||
| 315 | } | 321 | } |
| 316 | 322 | ||
| 317 | hook = XSYMBOL (sym)->function; | 323 | hook = XSYMBOL (sym)->function; |