]> git.eshelyaron.com Git - emacs.git/commitdiff
(Info-index): Strip leading colon from topic.
authorKim F. Storm <storm@cua.dk>
Thu, 7 Dec 2006 16:05:56 +0000 (16:05 +0000)
committerKim F. Storm <storm@cua.dk>
Thu, 7 Dec 2006 16:05:56 +0000 (16:05 +0000)
lisp/info.el

index 05c07220892275e7f2c61f1c38ac7cb9eda00de9..2318f3240dd563a276ad3fe0a51173b2c73cbca8 100644 (file)
@@ -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)))