2011-08-20 Glenn Morris <rgm@gnu.org>
+ * tutorial.el (help-with-tutorial): Avoid an error on short screens.
+
* tutorial.el (tutorial--default-keys): Update some default bindings.
* files.el (hack-local-variables): Fully ignore case for "mode:".
(search-forward ">>")
(replace-match "]")))
(beginning-of-line)
+ ;; FIXME: if the window is not tall, and especially if the
+ ;; big red "NOTICE: The main purpose..." text has been
+ ;; inserted at the start of the buffer, the "type C-v to
+ ;; move to the next screen" might not be visible on the
+ ;; first screen (n < 0). How will the novice know what to do?
(let ((n (- (window-height (selected-window))
(count-lines (point-min) (point))
6)))
;; For a short gap, we don't need the [...] line,
;; so delete it.
(delete-region (point) (progn (end-of-line) (point)))
- (newline n))
+ (if (> n 0) (newline n)))
;; Some people get confused by the large gap.
(newline (/ n 2))