* lisp/info.el (Info-copy-current-node-name, Info-breadcrumbs)
authorJuri Linkov <juri@jurta.org>
Sat, 8 Dec 2012 23:12:08 +0000 (01:12 +0200)
committerJuri Linkov <juri@jurta.org>
Sat, 8 Dec 2012 23:12:08 +0000 (01:12 +0200)
(Info-fontify-node, Info-bookmark-make-record): Remove the
file extension from Info-current-file.

Fixes: debbugs:13016

lisp/ChangeLog
lisp/info.el

index d94a188..6bf6726 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-08  Juri Linkov  <juri@jurta.org>
+
+       * 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  <monnier@iro.umontreal.ca>
 
        * hi-lock.el (hi-lock-unface-buffer): If there's no matching regexp at
index abceb73..4c7bb98 100644 (file)
@@ -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))