From 40ce93b55acf2a03f8455370694bff2205f9602d Mon Sep 17 00:00:00 2001 From: Pierre Courtieu Date: Wed, 13 Jun 2018 17:00:51 +0200 Subject: Fix multiple hyp overlays. queries would trigger re-generarion of overlays. Now overlays are generated if there are no overlays already. --- coq/coq-syntax.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'coq/coq-syntax.el') diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el index 5b12bd8e..d6850a0a 100644 --- a/coq/coq-syntax.el +++ b/coq/coq-syntax.el @@ -1373,8 +1373,14 @@ part of another hypothesis.") ; Matches the end of the last hyp, before the ======... separator. (defvar coq-hyp-name-or-goalsep-in-goal-or-response-regexp - (concat coq-hyp-name-in-goal-or-response-regexp "\\|\\(?1:^\\s-+========\\)") - ) + (concat coq-hyp-name-in-goal-or-response-regexp "\\|\\(?1:^\\s-+========\\)")) + +(defun coq-find-first-hyp () + (with-current-buffer proof-goals-buffer + (save-excursion + (goto-char (point-min)) + (search-forward-regexp coq-hyp-name-in-goal-or-response-regexp nil t) + (match-beginning 2)))) (defun coq-detect-hyps-positions (buf &optional limit) "Detect all hypothesis displayed in buffer BUF and returns positions. -- cgit v1.2.3