+
+;; Buffer context
+
+(defun buffer-syntactic-context (&optional buffer)
+ "Syntactic context at point in BUFFER.
+Either of `string', `comment' or nil.
+This is an XEmacs compatibility function."
+ (with-current-buffer (or buffer (current-buffer))
+ (let ((state (syntax-ppss (point))))
+ (cond
+ ((nth 3 state) 'string)
+ ((nth 4 state) 'comment)))))
+
+
+(defun buffer-syntactic-context-depth (&optional buffer)
+ "Syntactic parenthesis depth at point in BUFFER.
+This is an XEmacs compatibility function."
+ (with-current-buffer (or buffer (current-buffer))
+ (nth 0 (syntax-ppss (point)))))
+
+
+;; Extents