aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-09-29 10:38:24 +0200
committerGravatar Pierre Courtieu <Pierre.Courtieu@cnam.fr>2015-09-29 13:22:21 +0200
commit2d2d90e22a9dcf979d10dd41eb08818126ab650e (patch)
tree9a76fa8ff28b40a3befb85f53c8e23431514c5b1 /coq/coq.el
parent8f984a7272de74d8a88cffcef2ca6160d710b335 (diff)
Fixed #1 (Missing space in coq-insert-intros).
Added a newline and removed the useless intros.
Diffstat (limited to 'coq/coq.el')
-rw-r--r--coq/coq.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/coq/coq.el b/coq/coq.el
index ea2da5d0..8cf818dd 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -2065,12 +2065,14 @@ mouse activation."
Based on idea mentioned in Coq reference manual."
(interactive)
(let* ((shints (proof-shell-invisible-cmd-get-result "Show Intros."))
- (intros (replace-regexp-in-string "^\\([^\n]+\\)\n" "intros \\1." shints t)))
+ ;; insert a dot before the trailing \n and put intros at begining
+ (intros (concat "intros " (substring shints 0 (- (length shints) 1)) ".\n")))
(if (or (< (length shints) 2);; empty response is just NL
(string-match coq-error-regexp shints))
(error "Don't know what to intro")
- (insert intros)
- (indent-according-to-mode))))
+ (let ((pt (point)))
+ (insert intros)
+ (indent-region pt (point))))))
(defvar coq-commands-accepting-as (regexp-opt '("induction" "destruct" "inversion" "injection")))