comparison src/abbrev.c @ 272:c5d627a313b1 r21-0b34

Import from CVS: tag r21-0b34
author cvs
date Mon, 13 Aug 2007 10:28:48 +0200
parents 0e522484dd2a
children 7df0dd720c89
comparison
equal deleted inserted replaced
271:c7b7086b0a39 272:c5d627a313b1
67 /* A string for the actual text of the abbrev most recently expanded. 67 /* A string for the actual text of the abbrev most recently expanded.
68 This has more info than Vlast_abbrev since case is significant. */ 68 This has more info than Vlast_abbrev since case is significant. */
69 Lisp_Object Vlast_abbrev_text; 69 Lisp_Object Vlast_abbrev_text;
70 70
71 /* Character address of start of last abbrev expanded */ 71 /* Character address of start of last abbrev expanded */
72 int last_abbrev_point; 72 int last_abbrev_location;
73
74 Lisp_Object oblookup (Lisp_Object, CONST Bufbyte *, Bytecount);
75 73
76 /* Hook to run before expanding any abbrev. */ 74 /* Hook to run before expanding any abbrev. */
77 Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook; 75 Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook;
78 76
79 77
353 351
354 /* Remember the last abbrev text, location, etc. */ 352 /* Remember the last abbrev text, location, etc. */
355 XSETSYMBOL (Vlast_abbrev, abbrev_symbol); 353 XSETSYMBOL (Vlast_abbrev, abbrev_symbol);
356 Vlast_abbrev_text = 354 Vlast_abbrev_text =
357 make_string_from_buffer (buf, abbrev_start, abbrev_length); 355 make_string_from_buffer (buf, abbrev_start, abbrev_length);
358 last_abbrev_point = abbrev_start; 356 last_abbrev_location = abbrev_start;
359 357
360 /* Add an undo boundary, in case we are doing this for a 358 /* Add an undo boundary, in case we are doing this for a
361 self-inserting command which has avoided making one so far. */ 359 self-inserting command which has avoided making one so far. */
362 if (INTERACTIVE) 360 if (INTERACTIVE)
363 Fundo_boundary (); 361 Fundo_boundary ();
433 DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text /* 431 DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text /*
434 The exact text of the last abbrev expanded. 432 The exact text of the last abbrev expanded.
435 nil if the abbrev has already been unexpanded. 433 nil if the abbrev has already been unexpanded.
436 */ ); 434 */ );
437 435
438 DEFVAR_INT ("last-abbrev-location", &last_abbrev_point /* 436 DEFVAR_INT ("last-abbrev-location", &last_abbrev_location /*
439 The location of the start of the last abbrev expanded. 437 The location of the start of the last abbrev expanded.
440 */ ); 438 */ );
441 439
442 Vlast_abbrev = Qnil; 440 Vlast_abbrev = Qnil;
443 Vlast_abbrev_text = Qnil; 441 Vlast_abbrev_text = Qnil;
444 last_abbrev_point = 0; 442 last_abbrev_location = 0;
445 443
446 DEFVAR_LISP ("abbrev-start-location", &Vabbrev_start_location /* 444 DEFVAR_LISP ("abbrev-start-location", &Vabbrev_start_location /*
447 Buffer position for `expand-abbrev' to use as the start of the abbrev. 445 Buffer position for `expand-abbrev' to use as the start of the abbrev.
448 nil means use the word before point as the abbrev. 446 nil means use the word before point as the abbrev.
449 Calling `expand-abbrev' sets this to nil. 447 Calling `expand-abbrev' sets this to nil.