diff options
author | 2006-10-23 07:46:42 +0000 | |
---|---|---|
committer | 2006-10-23 07:46:42 +0000 | |
commit | 40a7b597d4ac26214bd50bf1b0dc19391fd7f1ad (patch) | |
tree | 4dd3d2033250bf5fd568623e2fbf374e7525974f | |
parent | 8225f0e1764068baa36288b30ad3a16c85830c79 (diff) |
Error highlighting in coq only when scripting (not when sending
command invisibly).
-rw-r--r-- | coq/coq.el | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1478,11 +1478,22 @@ buffer." (delete-span sp) ))))) -(defun coq-highlight-error-hook () - (save-excursion (coq-highlight-error t t))) +(setq coq-allow-highlight-error t) + +;; if a command is sent to coq without being in the script, then don't +;; higilight the error +(defun coq-decide-highlight-error () + (if (eq action 'proof-done-invisible) + (setq coq-allow-highlight-error nil) + (setq coq-allow-highlight-error t))) + +(defun coq-highlight-error-hook () + (if coq-allow-highlight-error (save-excursion (coq-highlight-error t t)))) +;; We need this two hooks to highlight only when scripting (add-hook 'proof-shell-handle-error-or-interrupt-hook 'coq-highlight-error-hook t) +(add-hook 'proof-shell-insert-hook 'coq-decide-highlight-error t) (provide 'coq) |