X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fabbrev.c;h=5687ee15fa6d8cc86d2f2c709c06e2fedf6ebb96;hb=761f92c159f8327ecf570ab8e9a4b27cd5e35732;hp=30b5993f0e66f888f1cf4eede27ca2bf19229172;hpb=716cfba952c1dc0d2cf5c968971f3780ba728a89;p=chise%2Fxemacs-chise.git.1 diff --git a/src/abbrev.c b/src/abbrev.c index 30b5993..5687ee1 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -1,5 +1,6 @@ /* Primitives for word-abbrev mode. Copyright (C) 1985, 1986, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -69,7 +70,7 @@ Lisp_Object Vlast_abbrev; Lisp_Object Vlast_abbrev_text; /* Character address of start of last abbrev expanded */ -int last_abbrev_location; +Fixnum last_abbrev_location; /* Hook to run before expanding any abbrev. */ Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook; @@ -157,7 +158,11 @@ abbrev_match (struct buffer *buf, Lisp_Object obarray) closure.buf = buf; closure.point = BUF_PT (buf); closure.maxlen = closure.point - BUF_BEGV (buf); +#ifdef UTF2000 + closure.chartab = XCHAR_TABLE (buf->syntax_table); +#else closure.chartab = XCHAR_TABLE (buf->mirror_syntax_table); +#endif closure.found = 0; map_obarray (obarray, abbrev_match_mapper, &closure); @@ -385,8 +390,14 @@ If no abbrev matched, but `pre-abbrev-expand-hook' changed the buffer, Bufpos pos = abbrev_start; /* Find the initial. */ while (pos < point +#ifdef UTF2000 + && !WORD_SYNTAX_P (XCHAR_TABLE (buf->syntax_table), + BUF_FETCH_CHAR (buf, pos)) +#else && !WORD_SYNTAX_P (XCHAR_TABLE (buf->mirror_syntax_table), - BUF_FETCH_CHAR (buf, pos))) + BUF_FETCH_CHAR (buf, pos)) +#endif + ) pos++; /* Change just that. */ Fupcase_initials_region (make_int (pos), make_int (pos + 1),