Function: char-syntax
char-syntax is a function defined in syntax.c.
Signature
(char-syntax CHARACTER)
Documentation
Return the syntax code of CHARACTER, described by a character.
For example, if CHARACTER is a word constituent, the
character w (119) is returned.
The characters that correspond to various syntax codes
are listed in the documentation of modify-syntax-entry.
If you're trying to determine the syntax of characters in the buffer,
this is probably the wrong function to use, because it can't take
syntax-table text properties into account. Consider using
syntax-after instead.
Probably introduced at or before Emacs version 17.
Source Code
// Defined in /usr/src/emacs/src/syntax.c
{
CHECK_CHARACTER (character);
int char_int = XFIXNAT (character);
SETUP_BUFFER_SYNTAX_TABLE ();
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
char_int = make_char_multibyte (char_int);
return make_fixnum (syntax_code_spec[SYNTAX (char_int)]);
}