From: Taylor R Campbell Date: Sat, 19 Jan 2013 05:07:42 +0000 (+0000) Subject: Report a meaningful error message if the TUTORIAL file is hosed. X-Git-Tag: release-9.2.0~201 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2271bd7669fd8d839c7ad07753bf00e539a48b75;p=mit-scheme.git Report a meaningful error message if the TUTORIAL file is hosed. --- diff --git a/src/edwin/hlpcom.scm b/src/edwin/hlpcom.scm index 1bcde9297..25d6857e1 100644 --- a/src/edwin/hlpcom.scm +++ b/src/edwin/hlpcom.scm @@ -291,11 +291,12 @@ If you want VALUE to be a string, you must surround it with doublequotes." (select-buffer buffer) (set-current-major-mode! (ref-mode-object fundamental)) (disable-buffer-auto-save! buffer) - (let ((mark - (line-start (search-forward "\n<<" - (buffer-start buffer) - (buffer-end buffer)) - 0))) + (let* ((mark + (or (search-forward "\n<<" + (buffer-start buffer) + (buffer-end buffer)) + (error "Edwin tutorial is corrupted"))) + (mark (line-start mark 0))) (delete-string (line-end mark -1) (line-end mark 0)) (let ((wanted-newlines (- (window-y-size (current-window))