diff options
author | 2013-07-17 11:03:24 +0000 | |
---|---|---|
committer | 2013-07-17 11:03:24 +0000 | |
commit | c660b5bfb3be6971ee9dfc111be08dd00fbace0d (patch) | |
tree | b7612082ee230f33ce5dd8742555c3ac184f5f70 /coq | |
parent | 6ba6a73bb719ebb99065747cf07c9f9066e299a7 (diff) |
disable and protect coq-hide-additional-subgoals-switch for coq-time-commands
Diffstat (limited to 'coq')
-rw-r--r-- | coq/coq.el | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -621,11 +621,26 @@ If locked span already has a state number, then do nothing. Also updates (defun coq-hide-additional-subgoals-switch () "Function invoked when the user switches `coq-hide-additional-subgoals'." - (if coq-hide-additional-subgoals - (setq proof-shell-end-goals-regexp coq-end-goals-regexp-hide-subgoals) - (setq proof-shell-end-goals-regexp coq-end-goals-regexp-show-subgoals))) - - + (if coq-time-commands + (progn + (setq coq-hide-additional-subgoals nil) + (error + "You must disable ``Time Commands'' (var coq-time-commands) first")) + (if coq-hide-additional-subgoals + (setq proof-shell-end-goals-regexp coq-end-goals-regexp-hide-subgoals) + (setq proof-shell-end-goals-regexp coq-end-goals-regexp-show-subgoals)))) + +(defun coq-time-commands-switch () + "Function invoked when the user switches `coq-time-commands'. +Resets `coq-hide-additional-subgoals' and puts nil into +`proof-shell-end-goals-regexp' to ensure the timing is visible in +the *goals* buffer." + (if coq-time-commands + (progn + (let ((coq-time-commands nil)) + (customize-set-variable 'coq-hide-additional-subgoals nil)) + (setq proof-shell-end-goals-regexp nil)) + (coq-hide-additional-subgoals-switch))) ;; ;; Commands for Coq @@ -1437,7 +1452,8 @@ and `coq-use-project-file' to disable this feature." (defpacustom time-commands nil "Whether to display timing information for each command." - :type 'boolean) + :type 'boolean + :eval (coq-time-commands-switch)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |