aboutsummaryrefslogtreecommitdiff
path: root/generic/pg-user.el
diff options
context:
space:
mode:
authorErik Martin-Dorel2021-04-21 20:00:36 +0200
committerGitHub2021-04-21 20:00:36 +0200
commitb5c4c3a1423c7925194334d66c262054d6a6c4c5 (patch)
treee7878c97ece66bd7941e8f6019f70325de3f1bd1 /generic/pg-user.el
parentd0acb626eba17023c55b002921870d60e48527a5 (diff)
parent82311da10ee3dfa6f29ddfb9225f9f05c29dca31 (diff)
Merge pull request #559 from hendriktews/omit-proofsHEADmaster
Add feature to omit complete opaque proofs
Diffstat (limited to 'generic/pg-user.el')
-rw-r--r--generic/pg-user.el56
1 files changed, 33 insertions, 23 deletions
diff --git a/generic/pg-user.el b/generic/pg-user.el
index f10f02c1..005d919e 100644
--- a/generic/pg-user.el
+++ b/generic/pg-user.el
@@ -165,19 +165,24 @@ If called interactively, NUM is given by the prefix argument."
;;
;;;###autoload
-(defun proof-goto-point ()
+(defun proof-goto-point (&optional raw)
"Assert or retract to the command at current position.
Calls `proof-assert-until-point' or `proof-retract-until-point' as
-appropriate."
- (interactive)
- (save-excursion
- (if (> (proof-queue-or-locked-end) (point))
- (proof-retract-until-point)
- (if (proof-only-whitespace-to-locked-region-p)
- (progn
- (skip-chars-forward " \t\n")
- (forward-char 1)))
- (proof-assert-until-point))))
+appropriate. With prefix argument RAW the omit proofs feature
+(`proof-omit-proofs-option') is temporaily disabled to check all
+proofs in the asserted region."
+ (interactive "P")
+ (let ((proof-omit-proofs-option proof-omit-proofs-option))
+ (when raw
+ (setq proof-omit-proofs-option nil))
+ (save-excursion
+ (if (> (proof-queue-or-locked-end) (point))
+ (proof-retract-until-point)
+ (if (proof-only-whitespace-to-locked-region-p)
+ (progn
+ (skip-chars-forward " \t\n")
+ (forward-char 1)))
+ (proof-assert-until-point)))))
(defun proof-assert-next-command-interactive ()
"Process until the end of the next unprocessed command after point.
@@ -198,18 +203,23 @@ If inside a comment, just process until the start of the comment."
(proof-assert-until-point))
;;;###autoload
-(defun proof-process-buffer ()
- "Process the current (or script) buffer, and maybe move point to the end."
- (interactive)
- (proof-with-script-buffer
- (save-excursion
- (goto-char (point-max))
- (proof-assert-until-point-interactive))
- (proof-maybe-follow-locked-end))
- (when proof-fast-process-buffer
- (message "Processing buffer...")
- (proof-shell-wait)
- (message "Processing buffer...done")))
+(defun proof-process-buffer (&optional raw)
+ "Process the current (or script) buffer, and maybe move point to the end.
+With prefix argument RAW the omit proofs feature (`proof-omit-proofs-option')
+is temporaily disabled to check all proofs in the asserted region."
+ (interactive "P")
+ (let ((proof-omit-proofs-option proof-omit-proofs-option))
+ (when raw
+ (setq proof-omit-proofs-option nil))
+ (proof-with-script-buffer
+ (save-excursion
+ (goto-char (point-max))
+ (proof-assert-until-point-interactive))
+ (proof-maybe-follow-locked-end))
+ (when proof-fast-process-buffer
+ (message "Processing buffer...")
+ (proof-shell-wait)
+ (message "Processing buffer...done"))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;