From 18dc29086bb5683f2cc00ac7de5742d4eb1a9d08 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Wed, 9 Sep 2009 23:28:37 +0000 Subject: pg-last-output-displayform: strip trailing CR as well as initial one, to tidy up popups for Isabelle. --- generic/proof-script.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'generic/proof-script.el') diff --git a/generic/proof-script.el b/generic/proof-script.el index d3f64ab3..da28e372 100644 --- a/generic/proof-script.el +++ b/generic/proof-script.el @@ -631,9 +631,11 @@ NAME does not need to be unique." unicode-tokens-mode) (unicode-tokens-encode-str proof-shell-last-output) proof-shell-last-output)))) - ;; NOTE: hack for Isabelle which puts ugly leading \n's in proofstate. - (if (eq (string-match "^\n" text) 0) + ;; NOTE: hack for Isabelle which puts ugly leading \n's around proofstate. + (if (string= (substring text 0 1) "\n") (setq text (substring text 1))) + (if (string= (substring text -1) "\n") + (setq text (substring text 0 -1))) text)) ;;;###autoload -- cgit v1.2.3