From 858aab4c0267bd9c3760f337e03916b238d712c1 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 9 Dec 2012 01:12:08 +0200 Subject: [PATCH] * lisp/info.el (Info-copy-current-node-name, Info-breadcrumbs) (Info-fontify-node, Info-bookmark-make-record): Remove the file extension from Info-current-file. Fixes: debbugs:13016 --- lisp/ChangeLog | 6 ++++++ lisp/info.el | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d94a18820e2..6bf6726986e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-12-08 Juri Linkov + + * info.el (Info-copy-current-node-name, Info-breadcrumbs) + (Info-fontify-node, Info-bookmark-make-record): Remove the + file extension from Info-current-file (Bug#13016). + 2012-12-07 Stefan Monnier * hi-lock.el (hi-lock-unface-buffer): If there's no matching regexp at diff --git a/lisp/info.el b/lisp/info.el index abceb73bea0..4c7bb981afc 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4034,7 +4034,9 @@ With a zero prefix arg, put the name inside a function call to `info'." (unless Info-current-node (user-error "No current Info node")) (let ((node (if (stringp Info-current-file) - (concat "(" (file-name-nondirectory Info-current-file) ") " + (concat "(" (file-name-sans-extension + (file-name-nondirectory Info-current-file)) + ") " Info-current-node)))) (if (zerop (prefix-numeric-value arg)) (setq node (concat "(info \"" node "\")"))) @@ -4421,7 +4423,8 @@ first line or header line, and for breadcrumb links.") (if (not (equal node "Top")) node (format "(%s)Top" (if (stringp Info-current-file) - (file-name-nondirectory Info-current-file) + (file-name-sans-extension + (file-name-nondirectory Info-current-file)) ;; Some legacy code can still use a symbol. Info-current-file))))) (setq line (concat @@ -4533,7 +4536,8 @@ first line or header line, and for breadcrumb links.") (if (re-search-forward (format "File: %s\\([^,\n\t]+\\)," (if (stringp Info-current-file) - (file-name-nondirectory Info-current-file) + (file-name-sans-extension + (file-name-nondirectory Info-current-file)) Info-current-file)) header-end t) (put-text-property (match-beginning 1) (match-end 1) @@ -5071,7 +5075,8 @@ BUFFER is the buffer speedbar is requesting buttons for." "This implements the `bookmark-make-record-function' type (which see) for Info nodes." (let* ((file (and (stringp Info-current-file) - (file-name-nondirectory Info-current-file))) + (file-name-sans-extension + (file-name-nondirectory Info-current-file)))) (bookmark-name (if file (concat "(" file ") " Info-current-node) Info-current-node)) -- 2.39.5