]> git.eshelyaron.com Git - emacs.git/commitdiff
(Info-read-node-name-1): In completion-base-size-function's
authorJuri Linkov <juri@jurta.org>
Fri, 16 Dec 2005 19:09:20 +0000 (19:09 +0000)
committerJuri Linkov <juri@jurta.org>
Fri, 16 Dec 2005 19:09:20 +0000 (19:09 +0000)
lambda return 1 if common-substring or minibuffer-completion-contents
starts with (, and 0 otherwise.

lisp/info.el

index 24d92b2bdd7d4c5c8a35f74c7ce6ef3f5e882947..79a8a5d0a3063a08df96c2e6d61402cf73dec062 100644 (file)
@@ -1517,7 +1517,12 @@ PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
 
 ;; Arrange to highlight the proper letters in the completion list buffer.
 (put 'Info-read-node-name-1 'completion-base-size-function
-     (lambda () 1))
+     (lambda ()
+       (if (string-match "\\`([^)]*\\'"
+                        (or completion-common-substring
+                            (minibuffer-completion-contents)))
+          1
+        0)))
 
 (defun Info-read-node-name (prompt &optional default)
   (let* ((completion-ignore-case t)