From: Stefan Monnier Date: Sun, 25 Nov 2001 22:05:17 +0000 (+0000) Subject: Don't profile syntax-ppss any more. X-Git-Tag: ttn-vms-21-2-B4~18171 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1ab0fac670b7575a683282e2f8c86b6525d6cca1;p=emacs.git Don't profile syntax-ppss any more. (syntax-after): New fun. --- diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index f00c8752dd4..68b2eaabbcb 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -279,7 +279,13 @@ Point is at POS when this function returns." ;; (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