comparison src/syntax.c @ 7968:a6372621abd9

(Fmatching_paren): New function. (Fchar_syntax): Pass arg directly to SYNTAX, no masking.
author Richard M. Stallman <rms@gnu.org>
date Sun, 19 Jun 1994 18:20:52 +0000
parents 63a2327f0783
children 49dc4ea976a0
comparison
equal deleted inserted replaced
7967:82a5362b244f 7968:a6372621abd9
221 are listed in the documentation of `modify-syntax-entry'.") 221 are listed in the documentation of `modify-syntax-entry'.")
222 (ch) 222 (ch)
223 Lisp_Object ch; 223 Lisp_Object ch;
224 { 224 {
225 CHECK_NUMBER (ch, 0); 225 CHECK_NUMBER (ch, 0);
226 return make_number (syntax_code_spec[(int) SYNTAX (0xFF & XINT (ch))]); 226 return make_number (syntax_code_spec[(int) SYNTAX (XINT (ch))]);
227 }
228
229 DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0,
230 "Return the matching parenthesis of CHAR, or nil if none.")
231 (ch)
232 Lisp_Object ch;
233 {
234 int code;
235 CHECK_NUMBER (ch, 0);
236 code = SYNTAX (XINT (ch));
237 if (code == Sopen && code == Sclose)
238 return make_number (SYNTAX_MATCH (XINT (ch)));
239 return Qnil;
227 } 240 }
228 241
229 /* This comment supplies the doc string for modify-syntax-entry, 242 /* This comment supplies the doc string for modify-syntax-entry,
230 for make-docfile to see. We cannot put this in the real DEFUN 243 for make-docfile to see. We cannot put this in the real DEFUN
231 due to limits in the Unix cpp. 244 due to limits in the Unix cpp.
1717 defsubr (&Ssyntax_table); 1730 defsubr (&Ssyntax_table);
1718 defsubr (&Sstandard_syntax_table); 1731 defsubr (&Sstandard_syntax_table);
1719 defsubr (&Scopy_syntax_table); 1732 defsubr (&Scopy_syntax_table);
1720 defsubr (&Sset_syntax_table); 1733 defsubr (&Sset_syntax_table);
1721 defsubr (&Schar_syntax); 1734 defsubr (&Schar_syntax);
1735 defsubr (&Smatching_paren);
1722 defsubr (&Smodify_syntax_entry); 1736 defsubr (&Smodify_syntax_entry);
1723 defsubr (&Sdescribe_syntax); 1737 defsubr (&Sdescribe_syntax);
1724 1738
1725 defsubr (&Sforward_word); 1739 defsubr (&Sforward_word);
1726 1740