changeset 61669:c95f35bea727

(syntax-class): New function.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 19 Apr 2005 18:11:26 +0000
parents 78ea81e48fa8
children c1e3fbdb9d71
files lisp/subr.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Tue Apr 19 15:19:31 2005 +0000
+++ b/lisp/subr.el	Tue Apr 19 18:11:26 2005 +0000
@@ -2286,6 +2286,10 @@
       (if (consp st) st
 	(aref (or st (syntax-table)) (char-after pos))))))
 
+(defun syntax-class (syntax)
+  "Return the syntax class part of the syntax descriptor SYNTAX."
+  (logand (car syntax) 255))
+
 (defun add-to-invisibility-spec (arg)
   "Add elements to `buffer-invisibility-spec'.
 See documentation for `buffer-invisibility-spec' for the kind of elements