diff options
-rw-r--r-- | coq/coq-par-compile.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/coq/coq-par-compile.el b/coq/coq-par-compile.el index 915fe3ed..f469b4df 100644 --- a/coq/coq-par-compile.el +++ b/coq/coq-par-compile.el @@ -612,12 +612,14 @@ function returns () if MODULE-ID comes from the standard library." (defun coq-par-unlock-ancestors-on-error () "Unlock ancestors which are not in an asserted span. Used for unlocking ancestors on compilation errors." - (maphash - (lambda (ancestor state) - (when (eq state 'locked) - (coq-unlock-ancestor ancestor) - (puthash ancestor nil coq-par-ancestor-files))) - coq-par-ancestor-files)) + (when coq-par-ancestor-files + ;; nil e.g. when enabling on-the-fly compilation after processing imports. + (maphash + (lambda (ancestor state) + (when (eq state 'locked) + (coq-unlock-ancestor ancestor) + (puthash ancestor nil coq-par-ancestor-files))) + coq-par-ancestor-files))) (defun coq-par-emergency-cleanup () "Emergency cleanup for parallel background compilation. |