# HG changeset patch # User Stefan Monnier # Date 1006725917 0 # Node ID 1df0e35d264cbdc13010d4bf88480b9ecdf66ae4 # Parent 6fbc91a79b0ba6bea082229fc57a34beafdc8b0c Don't profile syntax-ppss any more. (syntax-after): New fun. diff -r 6fbc91a79b0b -r 1df0e35d264c lisp/emacs-lisp/syntax.el --- a/lisp/emacs-lisp/syntax.el Sun Nov 25 22:03:45 2001 +0000 +++ b/lisp/emacs-lisp/syntax.el Sun Nov 25 22:05:17 2001 +0000 @@ -279,7 +279,13 @@ ;; (with-current-buffer (or buffer (current-buffer)) ;; (syntax-ppss-depth (syntax-ppss)))) -(elp-instrument-list '(syntax-ppss)) +(defun syntax-after (pos) + "Return the syntax of the char after POS." + (unless (or (< pos (point-min)) (>= pos (point-max))) + (let ((st (if parse-sexp-lookup-properties + (get-char-property pos 'syntax-table)))) + (if (consp st) st + (aref (or st (syntax-table)) (char-after pos)))))) (provide 'syntax) ;;; syntax.el ends here