From: Juri Linkov Date: Tue, 28 Aug 2012 09:01:54 +0000 (+0300) Subject: * lisp/info.el (Info-fontify-node): Hide empty lines at the end of the node. X-Git-Tag: emacs-24.2.90~491 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d44688e450495fd3b723c0f2cbdcd047c59e7384;p=emacs.git * lisp/info.el (Info-fontify-node): Hide empty lines at the end of the node. Fixes: debbugs:12272 --- 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: