Function: define-category

define-category is a function defined in category.c.

Signature

(define-category CATEGORY DOCSTRING &optional TABLE)

Documentation

Define CATEGORY as a category which is described by DOCSTRING.

CATEGORY should be an ASCII printing character in the range to ~.
DOCSTRING is the documentation string of the category. The first line should be a terse text (preferably less than 16 characters), and the rest lines should be the full description. The category is defined only in category table TABLE, which defaults to the current buffer's category table.

View in manual

Source Code

// Defined in /usr/src/emacs/src/category.c
{
  CHECK_CATEGORY (category);
  CHECK_STRING (docstring);
  table = check_category_table (table);

  if (!NILP (CATEGORY_DOCSTRING (table, XFIXNAT (category))))
    error ("Category `%c' is already defined", (int) XFIXNAT (category));
  if (!NILP (Vpurify_flag))
    docstring = Fpurecopy (docstring);
  SET_CATEGORY_DOCSTRING (table, XFIXNAT (category), docstring);

  return Qnil;
}