From 2271bd7669fd8d839c7ad07753bf00e539a48b75 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 19 Jan 2013 05:07:42 +0000 Subject: [PATCH] Report a meaningful error message if the TUTORIAL file is hosed. --- src/edwin/hlpcom.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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)) -- 2.25.1