summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2012-12-09 01:12:08 +0200
committerJuri Linkov <juri@jurta.org>2012-12-09 01:12:08 +0200
commit858aab4c0267bd9c3760f337e03916b238d712c1 (patch)
treed4c69bf2d025f370f4cb47c80f5a1bb1f14f1c66
parenta16e75cd3cb27ea5647774bc71625899f35b2fa6 (diff)
downloademacs-858aab4c0267bd9c3760f337e03916b238d712c1.tar.gz
* 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
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/info.el13
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 <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
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))