diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/syntax.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/syntax.c b/src/syntax.c index 6a75c16ac48..59571caf1c4 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -111,13 +111,13 @@ find_defun_start (pos) | |||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | DEFUN ("syntax-table-p", Fsyntax_table_p, Ssyntax_table_p, 1, 1, 0, | 113 | DEFUN ("syntax-table-p", Fsyntax_table_p, Ssyntax_table_p, 1, 1, 0, |
| 114 | "Return t if ARG is a syntax table.\n\ | 114 | "Return t if OBJECT is a syntax table.\n\ |
| 115 | Currently, any char-table counts as a syntax table.") | 115 | Currently, any char-table counts as a syntax table.") |
| 116 | (obj) | 116 | (object) |
| 117 | Lisp_Object obj; | 117 | Lisp_Object object; |
| 118 | { | 118 | { |
| 119 | if (CHAR_TABLE_P (obj) | 119 | if (CHAR_TABLE_P (object) |
| 120 | && XCHAR_TABLE (obj)->purpose == Qsyntax_table) | 120 | && XCHAR_TABLE (object)->purpose == Qsyntax_table) |
| 121 | return Qt; | 121 | return Qt; |
| 122 | return Qnil; | 122 | return Qnil; |
| 123 | } | 123 | } |
| @@ -237,27 +237,28 @@ syntax_parent_lookup (table, character) | |||
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | DEFUN ("char-syntax", Fchar_syntax, Schar_syntax, 1, 1, 0, | 239 | DEFUN ("char-syntax", Fchar_syntax, Schar_syntax, 1, 1, 0, |
| 240 | "Return the syntax code of CHAR, described by a character.\n\ | 240 | "Return the syntax code of CHARACTER, described by a character.\n\ |
| 241 | For example, if CHAR is a word constituent, the character `?w' is returned.\n\ | 241 | For example, if CHARACTER is a word constituent,\n\ |
| 242 | the character `w' is returned.\n\ | ||
| 242 | The characters that correspond to various syntax codes\n\ | 243 | The characters that correspond to various syntax codes\n\ |
| 243 | are listed in the documentation of `modify-syntax-entry'.") | 244 | are listed in the documentation of `modify-syntax-entry'.") |
| 244 | (ch) | 245 | (character) |
| 245 | Lisp_Object ch; | 246 | Lisp_Object character; |
| 246 | { | 247 | { |
| 247 | int char_int; | 248 | int char_int; |
| 248 | CHECK_NUMBER (ch, 0); | 249 | CHECK_NUMBER (character, 0); |
| 249 | char_int = XINT (ch); | 250 | char_int = XINT (character); |
| 250 | return make_number (syntax_code_spec[(int) SYNTAX (char_int)]); | 251 | return make_number (syntax_code_spec[(int) SYNTAX (char_int)]); |
| 251 | } | 252 | } |
| 252 | 253 | ||
| 253 | DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0, | 254 | DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0, |
| 254 | "Return the matching parenthesis of CHAR, or nil if none.") | 255 | "Return the matching parenthesis of CHARACTER, or nil if none.") |
| 255 | (ch) | 256 | (character) |
| 256 | Lisp_Object ch; | 257 | Lisp_Object character; |
| 257 | { | 258 | { |
| 258 | int char_int, code; | 259 | int char_int, code; |
| 259 | CHECK_NUMBER (ch, 0); | 260 | CHECK_NUMBER (character, 0); |
| 260 | char_int = XINT (ch); | 261 | char_int = XINT (character); |
| 261 | code = SYNTAX (char_int); | 262 | code = SYNTAX (char_int); |
| 262 | if (code == Sopen || code == Sclose) | 263 | if (code == Sopen || code == Sclose) |
| 263 | return make_number (SYNTAX_MATCH (char_int)); | 264 | return make_number (SYNTAX_MATCH (char_int)); |
| @@ -287,19 +288,19 @@ The second character of S is the matching parenthesis,\n\ | |||
| 287 | used only if the first character is `(' or `)'.\n\ | 288 | used only if the first character is `(' or `)'.\n\ |
| 288 | Any additional characters are flags.\n\ | 289 | Any additional characters are flags.\n\ |
| 289 | Defined flags are the characters 1, 2, 3, 4, b, and p.\n\ | 290 | Defined flags are the characters 1, 2, 3, 4, b, and p.\n\ |
| 290 | 1 means C is the start of a two-char comment start sequence.\n\ | 291 | 1 means CHAR is the start of a two-char comment start sequence.\n\ |
| 291 | 2 means C is the second character of such a sequence.\n\ | 292 | 2 means CHAR is the second character of such a sequence.\n\ |
| 292 | 3 means C is the start of a two-char comment end sequence.\n\ | 293 | 3 means CHAR is the start of a two-char comment end sequence.\n\ |
| 293 | 4 means C is the second character of such a sequence.\n\ | 294 | 4 means CHAR is the second character of such a sequence.\n\ |
| 294 | \n\ | 295 | \n\ |
| 295 | There can be up to two orthogonal comment sequences. This is to support\n\ | 296 | There can be up to two orthogonal comment sequences. This is to support\n\ |
| 296 | language modes such as C++. By default, all comment sequences are of style\n\ | 297 | language modes such as C++. By default, all comment sequences are of style\n\ |
| 297 | a, but you can set the comment sequence style to b (on the second character\n\ | 298 | a, but you can set the comment sequence style to b (on the second character\n\ |
| 298 | of a comment-start, or the first character of a comment-end sequence) using\n\ | 299 | of a comment-start, or the first character of a comment-end sequence) using\n\ |
| 299 | this flag:\n\ | 300 | this flag:\n\ |
| 300 | b means C is part of comment sequence b.\n\ | 301 | b means CHAR is part of comment sequence b.\n\ |
| 301 | \n\ | 302 | \n\ |
| 302 | p means C is a prefix character for `backward-prefix-chars';\n\ | 303 | p means CHAR is a prefix character for `backward-prefix-chars';\n\ |
| 303 | such characters are treated as whitespace when they occur\n\ | 304 | such characters are treated as whitespace when they occur\n\ |
| 304 | between expressions.") | 305 | between expressions.") |
| 305 | (char, s, table) | 306 | (char, s, table) |