From d44688e450495fd3b723c0f2cbdcd047c59e7384 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 28 Aug 2012 12:01:54 +0300 Subject: [PATCH] * lisp/info.el (Info-fontify-node): Hide empty lines at the end of the node. Fixes: debbugs:12272 --- lisp/ChangeLog | 5 +++++ lisp/info.el | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 25d0716ee5b..3dd2b7b1272 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-08-28 Juri Linkov + + * info.el (Info-fontify-node): Hide empty lines at the end of + the node. (Bug#12272) + 2012-08-27 Drew Adams * dired.el (dired-pop-to-buffer): Make window start at beginning diff --git a/lisp/info.el b/lisp/info.el index 7365b0efcfd..fe4afd72163 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -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)))) ;;; Speedbar support: -- 2.11.4.GIT