summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2006-12-07 16:05:56 +0000
committerKim F. Storm <storm@cua.dk>2006-12-07 16:05:56 +0000
commit1faa0d3423bbab6651a0cf7ba523c45e02bc0b3e (patch)
tree463f0988d0e895af4a0c0f06f8093314ffd1b68b /lisp/info.el
parent27db901687800c166a5c44dd983bee4cdcfce74d (diff)
downloademacs-1faa0d3423bbab6651a0cf7ba523c45e02bc0b3e.tar.gz
(Info-index): Strip leading colon from topic.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 05c07220892..2318f3240dd 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2805,6 +2805,11 @@ Give an empty topic name to go to the Index node itself."
(kill-buffer Info-complete-menu-buffer)))))
(if (equal Info-current-file "dir")
(error "The Info directory node has no index; use m to select a manual"))
+ ;; Strip leading colon in topic; index format does not allow them.
+ (if (and (stringp topic)
+ (> (length topic) 0)
+ (= (aref topic 0) ?:))
+ (setq topic (substring topic 1)))
(let ((orignode Info-current-node)
(pattern (format "\n\\* +\\([^\n]*%s[^\n]*\\):[ \t]+\\([^\n]*\\)\\.\\(?:[ \t\n]*(line +\\([0-9]+\\))\\)?"
(regexp-quote topic)))