aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-11-12 13:36:24 +0100
committerGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-11-12 13:36:24 +0100
commit447a6c87348358acd9077d2898d858c0368d3ae8 (patch)
tree50e8209b68322276b2b18240dd9d77e19466bf55
parent8260bc52e829f21a664c13c4b1c5b70a8b0ee048 (diff)
Debuging: display a warning.
The warning is displayed when failing to retrieve last prompt info. Once we understand what happened we can remove this warning.
-rw-r--r--coq/coq.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/coq/coq.el b/coq/coq.el
index bc2d299a..2b9b6813 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -593,7 +593,14 @@ If locked span already has a state number, then do nothing. Also updates
;; infos = promt infos of the very last prompt
;; sp = last locked span, which we want to fill with prompt infos
(let ((sp (if proof-script-buffer (proof-last-locked-span)))
- (infos (or (coq-last-prompt-info-safe) '(0 0 nil nil))))
+ (infos (or (coq-last-prompt-info-safe)
+ ;; the line above seems to return nil sometimes, let us
+ ;; issue a warning when this happens, so that we
+ ;; understand why.
+ (and (display-warning
+ 'proof-general
+ "oops nothing returned by (coq-last-prompt-info-safe)!!!" :debug) nil)
+ '(0 0 nil nil))))
(unless (or (not sp) (coq-get-span-statenum sp))
(coq-set-span-statenum sp coq-last-but-one-statenum))
(setq coq-last-but-one-statenum (car infos))