comparison src/abbrev.c @ 14098:aa682cae5c89

(Fdefine_abbrev_table): Fix previous change.
author Karl Heuer <kwzh@gnu.org>
date Tue, 09 Jan 1996 03:01:48 +0000
parents 1303d585443b
children ee40177f6c68
comparison
equal deleted inserted replaced
14097:91c55574973f 14098:aa682cae5c89
460 DEFUN ("define-abbrev-table", Fdefine_abbrev_table, Sdefine_abbrev_table, 460 DEFUN ("define-abbrev-table", Fdefine_abbrev_table, Sdefine_abbrev_table,
461 2, 2, 0, 461 2, 2, 0,
462 "Define TABLENAME (a symbol) as an abbrev table name.\n\ 462 "Define TABLENAME (a symbol) as an abbrev table name.\n\
463 Define abbrevs in it according to DEFINITIONS, which is a list of elements\n\ 463 Define abbrevs in it according to DEFINITIONS, which is a list of elements\n\
464 of the form (ABBREVNAME EXPANSION HOOK USECOUNT).") 464 of the form (ABBREVNAME EXPANSION HOOK USECOUNT).")
465 (tablename, defns) 465 (tablename, definitions)
466 Lisp_Object tablename, defns; 466 Lisp_Object tablename, definitions;
467 { 467 {
468 Lisp_Object name, exp, hook, count; 468 Lisp_Object name, exp, hook, count;
469 Lisp_Object table, elt; 469 Lisp_Object table, elt;
470 470
471 CHECK_SYMBOL (tablename, 0); 471 CHECK_SYMBOL (tablename, 0);
472 table = Fboundp (tablename); 472 table = Fboundp (tablename);
473 if (NILP (table) || (table = Fsymbol_value (tablename), NILP (table))) 473 if (NILP (table) || (table = Fsymbol_value (tablename), NILP (table)))
474 { 474 {
475 table = Fmake_abbrev_table (); 475 table = Fmake_abbrev_table ();
476 Fset (tablename, table); 476 Fset (tablename, table);
477 Vabbrev_table_name_list = 477 Vabbrev_table_name_list = Fcons (tablename, Vabbrev_table_name_list);
478 Fcons (tablename, Vabbrev_table_name_list);
479 } 478 }
480 CHECK_VECTOR (table, 0); 479 CHECK_VECTOR (table, 0);
481 480
482 for (;!NILP (definitions); definitions = Fcdr (definitions)) 481 for (; !NILP (definitions); definitions = Fcdr (definitions))
483 { 482 {
484 elt = Fcar (definitions); 483 elt = Fcar (definitions);
485 name = Fcar (elt); elt = Fcdr (elt); 484 name = Fcar (elt); elt = Fcdr (elt);
486 exp = Fcar (elt); elt = Fcdr (elt); 485 exp = Fcar (elt); elt = Fcdr (elt);
487 hook = Fcar (elt); elt = Fcdr (elt); 486 hook = Fcar (elt); elt = Fcdr (elt);