diff options
| author | Pierre Courtieu | 2007-04-16 12:45:15 +0000 |
|---|---|---|
| committer | Pierre Courtieu | 2007-04-16 12:45:15 +0000 |
| commit | d6460395d8004d1774241bca5e52bb168f62a144 (patch) | |
| tree | 5646a652bc3b81b88b88f212a89402049b4ed0de | |
| parent | c703ca2177dc305224125dbc25326453004e7d58 (diff) | |
Patch from Stefan Monnier.
| -rw-r--r-- | coq/coq.el | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -299,18 +299,14 @@ toplevel \"Coq <\". Returns nil if yes. This assumes that no ;; This function returns (defun coq-last-prompt-info (s) "Extract informations from the coq prompt S. See `coq-last-prompt-info-safe'." - (let* ((lastprompt (or s (error "no prompt !!?"))) - (regex - (concat "\\(" coq-id-shy "\\) < \\([0-9]+\\) |\\(\\(?:" coq-id-shy - "|?\\)*\\)| \\([0-9]+\\) < ")) - (s (string-match regex lastprompt)) - (lprf (match-string 3 lastprompt)) - ) - (cons (string-to-int (match-string 2 lastprompt)) - (cons (string-to-int (match-string 4 lastprompt)) - (cons (build-list-id-from-string lprf) nil))) - ) - ) + (let ((lastprompt (or s (error "no prompt !!?"))) + (regex + (concat "\\(" coq-id-shy "\\) < \\([0-9]+\\) |\\(\\(?:" coq-id-shy + "|?\\)*\\)| \\([0-9]+\\) < "))) + (when (string-match regex lastprompt) + (list (string-to-number (match-string 2 lastprompt)) + (string-to-number (match-string 4 lastprompt)) + (build-list-id-from-string (match-string 3 lastprompt)))))) (defun coq-last-prompt-info-safe () |
