aboutsummaryrefslogtreecommitdiff
path: root/generic/proof-script.el
diff options
context:
space:
mode:
Diffstat (limited to 'generic/proof-script.el')
-rw-r--r--generic/proof-script.el6
1 files changed, 4 insertions, 2 deletions
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