diff options
| author | Glenn Morris | 2011-08-20 15:53:00 -0700 |
|---|---|---|
| committer | Glenn Morris | 2011-08-20 15:53:00 -0700 |
| commit | c21a496aed7c1b0a40312197ca4ccb7376e2d96f (patch) | |
| tree | 201741b8c99b51579d2ff317601cb89ba04a17a4 /lisp/tutorial.el | |
| parent | 59ee05427dbe2d7aaad260ea7c85515dd3c63bc0 (diff) | |
| download | emacs-c21a496aed7c1b0a40312197ca4ccb7376e2d96f.tar.gz emacs-c21a496aed7c1b0a40312197ca4ccb7376e2d96f.zip | |
* lisp/tutorial.el (help-with-tutorial): Avoid an error on short screens.
Diffstat (limited to 'lisp/tutorial.el')
| -rw-r--r-- | lisp/tutorial.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index d47079af5af..c57ec33d2e2 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el | |||
| @@ -889,6 +889,11 @@ Run the Viper tutorial? ")) | |||
| 889 | (search-forward ">>") | 889 | (search-forward ">>") |
| 890 | (replace-match "]"))) | 890 | (replace-match "]"))) |
| 891 | (beginning-of-line) | 891 | (beginning-of-line) |
| 892 | ;; FIXME: if the window is not tall, and especially if the | ||
| 893 | ;; big red "NOTICE: The main purpose..." text has been | ||
| 894 | ;; inserted at the start of the buffer, the "type C-v to | ||
| 895 | ;; move to the next screen" might not be visible on the | ||
| 896 | ;; first screen (n < 0). How will the novice know what to do? | ||
| 892 | (let ((n (- (window-height (selected-window)) | 897 | (let ((n (- (window-height (selected-window)) |
| 893 | (count-lines (point-min) (point)) | 898 | (count-lines (point-min) (point)) |
| 894 | 6))) | 899 | 6))) |
| @@ -897,7 +902,7 @@ Run the Viper tutorial? ")) | |||
| 897 | ;; For a short gap, we don't need the [...] line, | 902 | ;; For a short gap, we don't need the [...] line, |
| 898 | ;; so delete it. | 903 | ;; so delete it. |
| 899 | (delete-region (point) (progn (end-of-line) (point))) | 904 | (delete-region (point) (progn (end-of-line) (point))) |
| 900 | (newline n)) | 905 | (if (> n 0) (newline n))) |
| 901 | ;; Some people get confused by the large gap. | 906 | ;; Some people get confused by the large gap. |
| 902 | (newline (/ n 2)) | 907 | (newline (/ n 2)) |
| 903 | 908 | ||