[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105512: * lisp/tutorial.el (help-wit
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105512: * lisp/tutorial.el (help-with-tutorial): Avoid an error on short screens. |
Date: |
Sat, 20 Aug 2011 15:53:00 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105512
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2011-08-20 15:53:00 -0700
message:
* lisp/tutorial.el (help-with-tutorial): Avoid an error on short screens.
modified:
lisp/ChangeLog
lisp/tutorial.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-08-20 22:41:41 +0000
+++ b/lisp/ChangeLog 2011-08-20 22:53:00 +0000
@@ -1,5 +1,7 @@
2011-08-20 Glenn Morris <address@hidden>
+ * 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:".
=== modified file 'lisp/tutorial.el'
--- a/lisp/tutorial.el 2011-08-20 22:41:41 +0000
+++ b/lisp/tutorial.el 2011-08-20 22:53:00 +0000
@@ -889,6 +889,11 @@
(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)))
@@ -897,7 +902,7 @@
;; 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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105512: * lisp/tutorial.el (help-with-tutorial): Avoid an error on short screens.,
Glenn Morris <=