diff options
author | Pierre Courtieu <Pierre.Courtieu@cnam.fr> | 2015-09-29 10:38:24 +0200 |
---|---|---|
committer | Pierre Courtieu <Pierre.Courtieu@cnam.fr> | 2015-09-29 13:22:21 +0200 |
commit | 2d2d90e22a9dcf979d10dd41eb08818126ab650e (patch) | |
tree | 9a76fa8ff28b40a3befb85f53c8e23431514c5b1 /coq/coq.el | |
parent | 8f984a7272de74d8a88cffcef2ca6160d710b335 (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.el | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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"))) |