Mercurial > emacs
comparison src/character.c @ 90159:08185296b491
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-44
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 272-288)
- src/xdisp.c (dump_glyph_row): Don't display overlay_arrow_p field.
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 67)
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 05 May 2005 00:04:55 +0000 |
parents | 680f4ba0cdc9 |
children | d4755c5aa57d |
comparison
equal
deleted
inserted
replaced
90158:bf4846baba9a | 90159:08185296b491 |
---|---|
1 /* Basic character support. | 1 /* Basic character support. |
2 Copyright (C) 1995, 1997, 1998, 2001 Electrotechnical Laboratory, JAPAN. | 2 Copyright (C) 1995, 1997, 1998, 2001 Electrotechnical Laboratory, JAPAN. |
3 Licensed to the Free Software Foundation. | 3 Licensed to the Free Software Foundation. |
4 Copyright (C) 2001 Free Software Foundation, Inc. | 4 Copyright (C) 2001, 2005 Free Software Foundation, Inc. |
5 Copyright (C) 2003 | 5 Copyright (C) 2003 |
6 National Institute of Advanced Industrial Science and Technology (AIST) | 6 National Institute of Advanced Industrial Science and Technology (AIST) |
7 Registration Number H13PRO009 | 7 Registration Number H13PRO009 |
8 | 8 |
9 This file is part of GNU Emacs. | 9 This file is part of GNU Emacs. |
530 CHECK_CHARACTER (ch); | 530 CHECK_CHARACTER (ch); |
531 c = XINT (ch); | 531 c = XINT (ch); |
532 return CHAR_TABLE_REF (Vchar_direction_table, c); | 532 return CHAR_TABLE_REF (Vchar_direction_table, c); |
533 } | 533 } |
534 | 534 |
535 DEFUN ("chars-in-region", Fchars_in_region, Schars_in_region, 2, 2, 0, | |
536 doc: /* Return number of characters between BEG and END. | |
537 This is now an obsolete function. We keep it just for backward compatibility. */) | |
538 (beg, end) | |
539 Lisp_Object beg, end; | |
540 { | |
541 int from, to; | |
542 | |
543 CHECK_NUMBER_COERCE_MARKER (beg); | |
544 CHECK_NUMBER_COERCE_MARKER (end); | |
545 | |
546 from = min (XFASTINT (beg), XFASTINT (end)); | |
547 to = max (XFASTINT (beg), XFASTINT (end)); | |
548 | |
549 return make_number (to - from); | |
550 } | |
551 | |
552 /* Return the number of characters in the NBYTES bytes at PTR. | 535 /* Return the number of characters in the NBYTES bytes at PTR. |
553 This works by looking at the contents and checking for multibyte | 536 This works by looking at the contents and checking for multibyte |
554 sequences while assuming that there's no invalid sequence. | 537 sequences while assuming that there's no invalid sequence. |
555 However, if the current buffer has enable-multibyte-characters = | 538 However, if the current buffer has enable-multibyte-characters = |
556 nil, we treat each byte as a character. */ | 539 nil, we treat each byte as a character. */ |
941 defsubr (&Smultibyte_char_to_unibyte); | 924 defsubr (&Smultibyte_char_to_unibyte); |
942 defsubr (&Schar_bytes); | 925 defsubr (&Schar_bytes); |
943 defsubr (&Schar_width); | 926 defsubr (&Schar_width); |
944 defsubr (&Sstring_width); | 927 defsubr (&Sstring_width); |
945 defsubr (&Schar_direction); | 928 defsubr (&Schar_direction); |
946 defsubr (&Schars_in_region); | |
947 defsubr (&Sstring); | 929 defsubr (&Sstring); |
948 | 930 |
949 DEFVAR_LISP ("translation-table-vector", &Vtranslation_table_vector, | 931 DEFVAR_LISP ("translation-table-vector", &Vtranslation_table_vector, |
950 doc: /* | 932 doc: /* |
951 Vector recording all translation tables ever defined. | 933 Vector recording all translation tables ever defined. |