bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12187: 24.1.50; `Info-breadcrumbs-depth' should show `File:' without


From: Juri Linkov
Subject: bug#12187: 24.1.50; `Info-breadcrumbs-depth' should show `File:' without ".info" suffix
Date: Wed, 22 Aug 2012 01:28:51 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu)

> I agree with Stefan - please elide the suffix in Emacs, at least.
> That could be done during rendering, if you do not think that
> makeinfo should do it generally.

This can be implemented in Emacs with the following patch.
The change should have no bad effect in case when makeinfo
will be changed to produce file names without suffix in the header.

=== modified file 'lisp/info.el'
--- lisp/info.el        2012-08-20 23:44:19 +0000
+++ lisp/info.el        2012-08-21 22:27:52 +0000
@@ -4537,7 +4537,17 @@ (defun Info-fontify-node ()
              ((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
+                  (concat (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))





reply via email to

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