]> git.eshelyaron.com Git - emacs.git/commitdiff
(syntax-class): New function.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 19 Apr 2005 18:11:26 +0000 (18:11 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 19 Apr 2005 18:11:26 +0000 (18:11 +0000)
lisp/subr.el

index 4ff9be7e8b98d970749c9b5161865bcc5c811258..7330f1d6ddf0a4c2d237ee42da7042bf00dea618 100644 (file)
@@ -2286,6 +2286,10 @@ from `standard-syntax-table' otherwise."
       (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