* lisp/info.el (Info-fontify-node): Hide empty lines at the end of the node.
authorJuri Linkov <juri@jurta.org>
Tue, 28 Aug 2012 09:01:54 +0000 (12:01 +0300)
committerJuri Linkov <juri@jurta.org>
Tue, 28 Aug 2012 09:01:54 +0000 (12:01 +0300)
Fixes: debbugs:12272

lisp/ChangeLog
lisp/info.el

index 25d0716..3dd2b7b 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-28  Juri Linkov  <juri@jurta.org>
+
+       * info.el (Info-fontify-node): Hide empty lines at the end of
+       the node.  (Bug#12272)
+
 2012-08-27  Drew Adams  <drew.adams@oracle.com>
 
        * dired.el (dired-pop-to-buffer): Make window start at beginning
index 7365b0e..fe4afd7 100644 (file)
@@ -4825,6 +4825,12 @@ first line or header line, and for breadcrumb links.")
                                  mouse-face highlight
                                  help-echo "mouse-2: go to this URL"))))
 
+      ;; Hide empty lines at the end of the node.
+      (goto-char (point-max))
+      (skip-chars-backward "\n")
+      (when (< (1+ (point)) (point-max))
+       (put-text-property (1+ (point)) (point-max) 'invisible t))
+
       (set-buffer-modified-p nil))))
 \f
 ;;; Speedbar support: