From: Juri Linkov Date: Wed, 22 Aug 2012 23:30:47 +0000 (+0300) Subject: * lisp/info.el (Info-fontify-node): Hide the suffix of the Info file name X-Git-Tag: emacs-24.2.90~532 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d1c0d176e8dc7e7e72d7e029b4c14d7dcc4eb9ec;p=emacs.git * lisp/info.el (Info-fontify-node): Hide the suffix of the Info file name in the header line. Fixes: debbugs:12187 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c45fc114e5c..c92691b64b8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-08-22 Juri Linkov + + * info.el (Info-fontify-node): Hide the suffix of the + Info file name in the header line. (Bug#12187) + 2012-08-22 Glenn Morris * calendar/cal-tex.el (cal-tex-weekly-common): diff --git a/lisp/info.el b/lisp/info.el index 15478f9063c..7365b0efcfd 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4527,7 +4527,17 @@ first line or header line, and for breadcrumb links.") ((not (bobp)) ;; Hide the punctuation at the end, too. (skip-chars-backward " \t,") - (put-text-property (point) header-end 'invisible t)))))) + (put-text-property (point) header-end 'invisible t) + ;; Hide the suffix of the Info file name. + (beginning-of-line) + (if (re-search-forward + (format "File: %s\\([^,\n\t]+\\)," + (if (stringp Info-current-file) + (file-name-nondirectory Info-current-file) + Info-current-file)) + header-end t) + (put-text-property (match-beginning 1) (match-end 1) + 'invisible t))))))) ;; Fontify titles (goto-char (point-min))