Mercurial > hg > xemacs-beta
comparison src/cmds.c @ 276:6330739388db r21-0b36
Import from CVS: tag r21-0b36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:30:37 +0200 |
parents | c5d627a313b1 |
children | 57709be46d1b |
comparison
equal
deleted
inserted
replaced
275:a68ae4439f57 | 276:6330739388db |
---|---|
369 { | 369 { |
370 c2 = BUF_FETCH_CHAR (buf, BUF_PT (buf) - 1); | 370 c2 = BUF_FETCH_CHAR (buf, BUF_PT (buf) - 1); |
371 | 371 |
372 if (WORD_SYNTAX_P (syntax_table, c2)) | 372 if (WORD_SYNTAX_P (syntax_table, c2)) |
373 { | 373 { |
374 #if 1 | |
375 Fexpand_abbrev (); | |
376 #else /* FSFmacs */ | |
374 Lisp_Object sym = Fexpand_abbrev (); | 377 Lisp_Object sym = Fexpand_abbrev (); |
375 | 378 |
379 /* I think this is too bogus to add. The function should | |
380 have a way of examining the character to be inserted, so | |
381 it can decide whether to insert it or not. We should | |
382 design it better than that. */ | |
383 | |
376 /* Here FSFmacs remembers MODIFF, compares it after | 384 /* Here FSFmacs remembers MODIFF, compares it after |
377 Fexpand_abbrev() finishes, and updates HAIRY. | 385 Fexpand_abbrev() finishes, and updates HAIRY. */ |
378 | 386 |
379 A synch with Emacs 20.2. I'm not sure if it's too bogus | 387 /* NOTE: we cannot simply check for Vlast_abbrev, because |
380 to copy, but I guess it can be useful. If we expanded an | |
381 abbrev which has a hook, and the hook has a non-nil | |
382 `no-self-insert' property, return right away -- don't | |
383 really self-insert. | |
384 | |
385 NOTE: we cannot simply check for Vlast_abbrev, because | |
386 Fexpand_abbrev() can bail out before setting it to | 388 Fexpand_abbrev() can bail out before setting it to |
387 anything meaningful, leaving us stuck with an old value. | 389 anything meaningful, leaving us stuck with an old value. |
388 Thus Fexpand_abbrev() was extended to return the actual | 390 Thus Fexpand_abbrev() was extended to return the actual |
389 abbrev symbol. */ | 391 abbrev symbol. */ |
390 if (!NILP (sym) | 392 if (!NILP (sym) |
394 Lisp_Object prop = Fget (symbol_function (XSYMBOL (sym)), | 396 Lisp_Object prop = Fget (symbol_function (XSYMBOL (sym)), |
395 Qno_self_insert, Qnil); | 397 Qno_self_insert, Qnil); |
396 if (!NILP (prop)) | 398 if (!NILP (prop)) |
397 return; | 399 return; |
398 } | 400 } |
401 #endif /* FSFmacs */ | |
399 } | 402 } |
400 } | 403 } |
401 if ((c1 == ' ' || c1 == '\n') | 404 if ((c1 == ' ' || c1 == '\n') |
402 && !noautofill | 405 && !noautofill |
403 && !NILP (buf->auto_fill_function)) | 406 && !NILP (buf->auto_fill_function)) |