diff options
| author | Pierre Courtieu | 2020-04-10 13:11:15 +0200 |
|---|---|---|
| committer | Pierre Courtieu | 2020-04-10 13:11:15 +0200 |
| commit | be9a8c86e0af408e7bd889040f344d314d5b6724 (patch) | |
| tree | 941509b84785e701eccce2d048149e1c537e5826 /coq/coq.el | |
| parent | d1053a06aa31ce05fa0741fb61dfb1266fcb0364 (diff) | |
| parent | e85e58415f6849b5dd692908cc2ea85d409f9354 (diff) | |
Merge branch 'master' of https://github.com/ProofGeneral/PG
Diffstat (limited to 'coq/coq.el')
| -rw-r--r-- | coq/coq.el | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -2503,17 +2503,21 @@ mouse activation." (progn (end-of-line) (point))))))) (insert (concat "End" section))))) + (defun coq--format-intros (output) - "Create an “intros” form from the OUTPUT of “Show Intros”." + "Create an “intros” or ”move” form from the OUTPUT of “Show Intros”." (let* ((shints1 (replace-regexp-in-string "^[0-9] subgoal\\(.\\|\n\\|\r\\)*" "" output)) (shints (replace-regexp-in-string "[\r\n ]*\\'" "" shints1))) (if (or (string= "" shints) (string-match coq-error-regexp shints)) (error "Don't know what to intro") - (format "intros %s" shints)))) + (save-excursion + (if (re-search-backward "Require.*ssreflect" nil t) + (format "move=> %s" shints) + (format "intros %s" shints)))))) (defun coq-insert-intros () - "Insert an intros command with names given by Show Intros. + "Insert an intros or move command with names given by Show Intros. Based on idea mentioned in Coq reference manual." (interactive) (let* ((output (proof-shell-invisible-cmd-get-result "Show Intros."))) |
