/[emacs]/emacs/src/abbrev.c
ViewVC logotype

Diff of /emacs/src/abbrev.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45 by pj, Sun Oct 21 08:50:13 2001 UTC revision 1.46 by pj, Fri Nov 2 20:15:12 2001 UTC
# Line 97  DEFUN ("clear-abbrev-table", Fclear_abbr Line 97  DEFUN ("clear-abbrev-table", Fclear_abbr
97  {  {
98    int i, size;    int i, size;
99    
100    CHECK_VECTOR (table, 0);    CHECK_VECTOR (table);
101    size = XVECTOR (table)->size;    size = XVECTOR (table)->size;
102    abbrevs_changed = 1;    abbrevs_changed = 1;
103    for (i = 0; i < size; i++)    for (i = 0; i < size; i++)
# Line 120  which is incremented each time the abbre Line 120  which is incremented each time the abbre
120       Lisp_Object table, name, expansion, hook, count;       Lisp_Object table, name, expansion, hook, count;
121  {  {
122    Lisp_Object sym, oexp, ohook, tem;    Lisp_Object sym, oexp, ohook, tem;
123    CHECK_VECTOR (table, 0);    CHECK_VECTOR (table);
124    CHECK_STRING (name, 1);    CHECK_STRING (name);
125    
126    if (NILP (count))    if (NILP (count))
127      count = make_number (0);      count = make_number (0);
128    else    else
129      CHECK_NUMBER (count, 0);      CHECK_NUMBER (count);
130    
131    sym = Fintern (name, table);    sym = Fintern (name, table);
132    
# Line 183  The default is to try buffer's mode-spec Line 183  The default is to try buffer's mode-spec
183       Lisp_Object abbrev, table;       Lisp_Object abbrev, table;
184  {  {
185    Lisp_Object sym;    Lisp_Object sym;
186    CHECK_STRING (abbrev, 0);    CHECK_STRING (abbrev);
187    if (!NILP (table))    if (!NILP (table))
188      sym = Fintern_soft (abbrev, table);      sym = Fintern_soft (abbrev, table);
189    else    else
# Line 244  Returns the abbrev symbol, if expansion Line 244  Returns the abbrev symbol, if expansion
244    if (!NILP (Vabbrev_start_location))    if (!NILP (Vabbrev_start_location))
245      {      {
246        tem = Vabbrev_start_location;        tem = Vabbrev_start_location;
247        CHECK_NUMBER_COERCE_MARKER (tem, 0);        CHECK_NUMBER_COERCE_MARKER (tem);
248        wordstart = XINT (tem);        wordstart = XINT (tem);
249        Vabbrev_start_location = Qnil;        Vabbrev_start_location = Qnil;
250        if (wordstart < BEGV || wordstart > ZV)        if (wordstart < BEGV || wordstart > ZV)
# Line 479  define the abbrev table NAME exactly as Line 479  define the abbrev table NAME exactly as
479    Lisp_Object table;    Lisp_Object table;
480    Lisp_Object stream;    Lisp_Object stream;
481    
482    CHECK_SYMBOL (name, 0);    CHECK_SYMBOL (name);
483    table = Fsymbol_value (name);    table = Fsymbol_value (name);
484    CHECK_VECTOR (table, 0);    CHECK_VECTOR (table);
485    
486    XSETBUFFER (stream, current_buffer);    XSETBUFFER (stream, current_buffer);
487    
# Line 516  of the form (ABBREVNAME EXPANSION HOOK U Line 516  of the form (ABBREVNAME EXPANSION HOOK U
516    Lisp_Object name, exp, hook, count;    Lisp_Object name, exp, hook, count;
517    Lisp_Object table, elt;    Lisp_Object table, elt;
518    
519    CHECK_SYMBOL (tablename, 0);    CHECK_SYMBOL (tablename);
520    table = Fboundp (tablename);    table = Fboundp (tablename);
521    if (NILP (table) || (table = Fsymbol_value (tablename), NILP (table)))    if (NILP (table) || (table = Fsymbol_value (tablename), NILP (table)))
522      {      {
# Line 524  of the form (ABBREVNAME EXPANSION HOOK U Line 524  of the form (ABBREVNAME EXPANSION HOOK U
524        Fset (tablename, table);        Fset (tablename, table);
525        Vabbrev_table_name_list = Fcons (tablename, Vabbrev_table_name_list);        Vabbrev_table_name_list = Fcons (tablename, Vabbrev_table_name_list);
526      }      }
527    CHECK_VECTOR (table, 0);    CHECK_VECTOR (table);
528    
529    for (; !NILP (definitions); definitions = Fcdr (definitions))    for (; !NILP (definitions); definitions = Fcdr (definitions))
530      {      {

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26