emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/help-fns.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/help-fns.el
Date: Mon, 01 Apr 2002 07:31:51 -0500

Index: emacs/lisp/help-fns.el
diff -c emacs/lisp/help-fns.el:1.7 emacs/lisp/help-fns.el:1.8
*** emacs/lisp/help-fns.el:1.7  Sat Feb 23 17:27:39 2002
--- emacs/lisp/help-fns.el      Mon Apr  1 07:31:51 2002
***************
*** 63,78 ****
        (goto-char (point-min))
        (search-forward "\n<<")
        (beginning-of-line)
!       (delete-region (point) (progn (end-of-line) (point)))
        (let ((n (- (window-height (selected-window))
                  (count-lines (point-min) (point))
                  6)))
!       (if (< n 12)
!           (newline n)
          ;; Some people get confused by the large gap.
          (newline (/ n 2))
!         (insert "[Middle of page left blank for didactic purposes.  "
!                 "Text continues below]")
          (newline (- n (/ n 2)))))
        (goto-char (point-min))
        (set-buffer-modified-p nil))))
--- 63,96 ----
        (goto-char (point-min))
        (search-forward "\n<<")
        (beginning-of-line)
!       ;; Convert the <<...>> line to the proper [...] line,
!       ;; or just delete the <<...>> line if a [...] line follows.
!       (cond ((save-excursion
!              (forward-line 1)
!              (looking-at "\\["))
!            (delete-region (point) (progn (forward-line 1) (point))))
!           ((looking-at "<<Blank lines inserted.*>>")
!            (replace-match "[Middle of page left blank for didactic purposes.  
 Text continues below]"))
!           (t
!            (looking-at "<<")
!            (replace-match "[")
!            (search-forward ">>")
!            (replace-match "]")))
!       (beginning-of-line)
        (let ((n (- (window-height (selected-window))
                  (count-lines (point-min) (point))
                  6)))
!       (if (< n 8)
!           (progn
!             ;; For a short gap, we don't need the [...] line,
!             ;; so delete it.
!             (delete-region (point) (progn (end-of-line) (point)))
!             (newline n))
          ;; Some people get confused by the large gap.
          (newline (/ n 2))
!         
!         ;; Skip the [...] line (don't delete it).
!         (forward-line 1)
          (newline (- n (/ n 2)))))
        (goto-char (point-min))
        (set-buffer-modified-p nil))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]