summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2001-11-25 22:05:17 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2001-11-25 22:05:17 +0000
commit1ab0fac670b7575a683282e2f8c86b6525d6cca1 (patch)
tree8d1b3573d0905ccb0b7c3cda054c34c146c2cc5a /lisp/emacs-lisp
parentc477f6880fca3bf593c6e02eb7fcdc6057dfac78 (diff)
downloademacs-1ab0fac670b7575a683282e2f8c86b6525d6cca1.tar.gz
emacs-1ab0fac670b7575a683282e2f8c86b6525d6cca1.tar.bz2
emacs-1ab0fac670b7575a683282e2f8c86b6525d6cca1.zip
Don't profile syntax-ppss any more.
(syntax-after): New fun.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/syntax.el8
1 files changed, 7 insertions, 1 deletions
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