diff options
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/help-fns.el | 28 |
2 files changed, 26 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8757ef5440d..97118b4b151 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2002-04-01 Richard M. Stallman <rms@gnu.org> | 1 | 2002-04-01 Richard M. Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * help-fns.el (help-with-tutorial): Allow various ways | ||
| 4 | to specify the text in the [...] line, in handling the <...> line. | ||
| 5 | |||
| 3 | * progmodes/idlw-rinfo.el (idlwave-system-routines): | 6 | * progmodes/idlw-rinfo.el (idlwave-system-routines): |
| 4 | WOLRDTITLE => WORLDTITLE. SUPRESS_VALUE => SUPPRESS_VALUE. | 7 | WOLRDTITLE => WORLDTITLE. SUPRESS_VALUE => SUPPRESS_VALUE. |
| 5 | 8 | ||
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 4b4f78c0847..e27e6fc119a 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -63,16 +63,34 @@ With arg, you are asked to choose which language." | |||
| 63 | (goto-char (point-min)) | 63 | (goto-char (point-min)) |
| 64 | (search-forward "\n<<") | 64 | (search-forward "\n<<") |
| 65 | (beginning-of-line) | 65 | (beginning-of-line) |
| 66 | (delete-region (point) (progn (end-of-line) (point))) | 66 | ;; Convert the <<...>> line to the proper [...] line, |
| 67 | ;; or just delete the <<...>> line if a [...] line follows. | ||
| 68 | (cond ((save-excursion | ||
| 69 | (forward-line 1) | ||
| 70 | (looking-at "\\[")) | ||
| 71 | (delete-region (point) (progn (forward-line 1) (point)))) | ||
| 72 | ((looking-at "<<Blank lines inserted.*>>") | ||
| 73 | (replace-match "[Middle of page left blank for didactic purposes. Text continues below]")) | ||
| 74 | (t | ||
| 75 | (looking-at "<<") | ||
| 76 | (replace-match "[") | ||
| 77 | (search-forward ">>") | ||
| 78 | (replace-match "]"))) | ||
| 79 | (beginning-of-line) | ||
| 67 | (let ((n (- (window-height (selected-window)) | 80 | (let ((n (- (window-height (selected-window)) |
| 68 | (count-lines (point-min) (point)) | 81 | (count-lines (point-min) (point)) |
| 69 | 6))) | 82 | 6))) |
| 70 | (if (< n 12) | 83 | (if (< n 8) |
| 71 | (newline n) | 84 | (progn |
| 85 | ;; For a short gap, we don't need the [...] line, | ||
| 86 | ;; so delete it. | ||
| 87 | (delete-region (point) (progn (end-of-line) (point))) | ||
| 88 | (newline n)) | ||
| 72 | ;; Some people get confused by the large gap. | 89 | ;; Some people get confused by the large gap. |
| 73 | (newline (/ n 2)) | 90 | (newline (/ n 2)) |
| 74 | (insert "[Middle of page left blank for didactic purposes. " | 91 | |
| 75 | "Text continues below]") | 92 | ;; Skip the [...] line (don't delete it). |
| 93 | (forward-line 1) | ||
| 76 | (newline (- n (/ n 2))))) | 94 | (newline (- n (/ n 2))))) |
| 77 | (goto-char (point-min)) | 95 | (goto-char (point-min)) |
| 78 | (set-buffer-modified-p nil)))) | 96 | (set-buffer-modified-p nil)))) |