From f10a4aad338255e9eed37b9ce3f2a82eb6d6553b Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 7 Sep 2021 16:59:52 +0200 Subject: [PATCH] Improve the Info mode line further * lisp/info.el (Info-set-mode-line): Improve the Info mode line further (bug#13776). --- lisp/info.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index 55893218562..62202d342c5 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1735,10 +1735,12 @@ escaped (\\\",\\\\)." (if (stringp Info-current-file) (string-replace "%" "%%" - (file-name-sans-extension - (file-name-nondirectory Info-current-file))) + ;; Remove trailing ".info" and ".info.gz", etc. + (replace-regexp-in-string + "\\..*\\'" "" + (file-name-nondirectory Info-current-file))) (format "*%S*" Info-current-file)) - 'help-echo "Info file name") + 'help-echo "Manual name") ") ") (if Info-current-node (propertize (string-replace -- 2.39.2