diff options
| -rw-r--r-- | generic/proof-compat.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/proof-compat.el b/generic/proof-compat.el index 31b57cb3..8bf90643 100644 --- a/generic/proof-compat.el +++ b/generic/proof-compat.el @@ -131,6 +131,16 @@ Otherwise treat \\ in NEWTEXT string as special: (concat rtn-str (substring str start))))) +(or (fboundp 'buffer-syntactic-context) +(defun buffer-syntactic-context (&optional buffer) + (save-excursion + (if buffer (set-buffer buffer)) + (let ((pp (parse-partial-sexp 1 (point)))) + (cond + ((nth 3 pp) 'string) + ((nth 7 pp) 'block-comment) + ((nth 4 pp) 'comment)))))) + ;; In case Emacs is not aware of the function read-shell-command, |
