aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Courtieu2015-02-03 10:41:15 +0000
committerPierre Courtieu2015-02-03 10:41:15 +0000
commit8a8b10266646de39f0234813a46ebded41348a86 (patch)
treec91c7e15e08245bbae9c3b9b5f8ca1aeb537ef25
parent806cd783045d19c985eec4863b9a488535ae331a (diff)
cleaning regexp.
-rw-r--r--coq/coq.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/coq/coq.el b/coq/coq.el
index f3bfe13b..601795e7 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -387,6 +387,7 @@ SMIE is a navigation and indentation framework available in Emacs >= 23.3."
(pg-response-display-with-face strnotrailingspace face)))
+
;;;;;;;;;;; Trying to accept { and } as terminator for empty commands. Actually
;;;;;;;;;;; I am experimenting two new commands "{" and "}" (without no
;;;;;;;;;;; trailing ".") which behave like BeginSubProof and EndSubproof. The
@@ -2122,16 +2123,17 @@ If PARSERESP and CLEAN are non-nil, delete the error location from the response
buffer."
(if (not parseresp) last-coq-error-location
;; proof-shell-handle-error-or-interrupt-hook is called from shell buffer
+ ;; then highlight the corresponding error location
(proof-with-current-buffer-if-exists proof-response-buffer
(goto-char (point-max))
- (when (re-search-backward "\n> \\(.*\\)\n> \\([^^]*\\)\\(\\^+\\)\n" nil t)
+ (when (re-search-backward "^> \\(.*\\)\n> \\([^^]*\\)\\(\\^+\\)\n" nil t)
(let ((text (match-string 1))
(pos (length (match-string 2)))
(len (length (match-string 3))))
;; clean the response buffer from ultra-ugly underlined command line
;; parsed above. Don't kill the first \n
(let ((inhibit-read-only t))
- (when clean (delete-region (+ (match-beginning 0) 1) (match-end 0))))
+ (when clean (delete-region (match-beginning 0) (match-end 0))))
(when proof-shell-unicode ;; TODO: remove this (when...) when coq-8.3 is out.
;; `pos' and `len' are actually specified in bytes, apparently. So
;; let's convert them, assuming the encoding used is utf-8.