Report a meaningful error message if the TUTORIAL file is hosed.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 19 Jan 2013 05:07:42 +0000 (05:07 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Sat, 19 Jan 2013 05:07:42 +0000 (05:07 +0000)
src/edwin/hlpcom.scm

index 1bcde9297ffca8b5aeed5bcf3bc384f2c3f0dbc0..25d6857e14907a0033cf789433cf1856d7a0cacb 100644 (file)
@@ -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))