X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4586442a5abbb9ccd6e7c4de0730763c0170cc12..51520a1a835ed916c9d014957defbd7d71e5236a:/src/category.h?ds=sidebyside diff --git a/src/category.h b/src/category.h index 858a94a622..f2224d8813 100644 --- a/src/category.h +++ b/src/category.h @@ -1,15 +1,18 @@ /* Declarations having to do with Emacs category tables. Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007 + 2005, 2006, 2007, 2008, 2009 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H14PRO021 + Copyright (C) 2003 + National Institute of Advanced Industrial Science and Technology (AIST) + Registration Number H13PRO009 This file is part of GNU Emacs. -GNU Emacs is free software; you can redistribute it and/or modify +GNU Emacs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,9 +20,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, USA. */ +along with GNU Emacs. If not, see . */ /* We introduce here three types of object: category, category set, @@ -69,7 +70,7 @@ Boston, MA 02110-1301, USA. */ /* Make CATEGORY_SET includes (if VAL is t) or excludes (if VAL is nil) CATEGORY. */ #define SET_CATEGORY_SET(category_set, category, val) \ - (Faset (category_set, category, val)) + (set_category_set (category_set, category, val)) #define CHECK_CATEGORY_SET(x) \ CHECK_TYPE (CATEGORY_SET_P (x), Qcategorysetp, x) @@ -93,21 +94,7 @@ extern Lisp_Object _temp_category_set; #define Vstandard_category_table buffer_defaults.category_table /* Return the category set of character C in the current category table. */ -#ifdef __GNUC__ -#define CATEGORY_SET(c) \ - ({ Lisp_Object table = current_buffer->category_table; \ - Lisp_Object temp; \ - if ((c) < CHAR_TABLE_SINGLE_BYTE_SLOTS) \ - while (NILP (temp = XCHAR_TABLE (table)->contents[(unsigned char) c]) \ - && NILP (temp = XCHAR_TABLE (table)->defalt)) \ - table = XCHAR_TABLE (table)->parent; \ - else \ - temp = Faref (table, make_number (c)); \ - temp; }) -#else -#define CATEGORY_SET(c) \ - Faref (current_buffer->category_table, make_number (c)) -#endif +#define CATEGORY_SET(c) char_category_set (c) /* Return the doc string of CATEGORY in category table TABLE. */ #define CATEGORY_DOCSTRING(table, category) \ @@ -120,13 +107,14 @@ extern Lisp_Object _temp_category_set; /* Return 1 if there is a word boundary between two word-constituent characters C1 and C2 if they appear in this order, else return 0. - There is no word boundary between two word-constituent ASCII - characters. */ + There is no word boundary between two word-constituent ASCII and + Latin-1 characters. */ #define WORD_BOUNDARY_P(c1, c2) \ (!(SINGLE_BYTE_CHAR_P (c1) && SINGLE_BYTE_CHAR_P (c2)) \ && word_boundary_p (c1, c2)) extern int word_boundary_p P_ ((int, int)); +extern void set_category_set P_ ((Lisp_Object, Lisp_Object, Lisp_Object)); /* arch-tag: 309dfe83-c3e2-4d22-8e81-faae5aece0ff (do not change this comment) */