emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/info.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/info.el,v
Date: Sun, 13 Apr 2008 22:12:04 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/04/13 22:12:02

Index: lisp/info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/info.el,v
retrieving revision 1.525
retrieving revision 1.526
diff -u -b -r1.525 -r1.526
--- lisp/info.el        25 Mar 2008 14:41:44 -0000      1.525
+++ lisp/info.el        13 Apr 2008 22:12:01 -0000      1.526
@@ -1513,20 +1513,15 @@
   (cond
    ;; First complete embedded file names.
    ((string-match "\\`([^)]*\\'" string)
-    (let ((file (substring string 1)))
-      (cond
-       ((eq code nil)
-       (let ((comp (try-completion file 'Info-read-node-name-2
-                                   (cons Info-directory-list
-                                         (mapcar 'car Info-suffix-list)))))
-         (cond
-          ((eq comp t) (concat string ")"))
-          (comp (concat "(" comp)))))
-       ((eq code t)
-       (all-completions file 'Info-read-node-name-2
+    (completion-table-with-context
+     "("
+     (apply-partially 'completion-table-with-terminator
+                      ")" 'Info-read-node-name-2)
+     (substring string 1)
                         (cons Info-directory-list
-                              (mapcar 'car Info-suffix-list))))
-       (t nil))))
+           (mapcar 'car Info-suffix-list))
+     code))
+
    ;; If a file name was given, then any node is fair game.
    ((string-match "\\`(" string)
     (cond
@@ -1534,21 +1529,11 @@
      ((eq code t) nil)
      (t t)))
    ;; Otherwise use Info-read-node-completion-table.
-   ((eq code nil)
-    (try-completion string Info-read-node-completion-table predicate))
-   ((eq code t)
-    (all-completions string Info-read-node-completion-table predicate))
-   (t
-    (test-completion string Info-read-node-completion-table predicate))))
+   (t (complete-with-action
+       code Info-read-node-completion-table string predicate))))
 
 ;; Arrange to highlight the proper letters in the completion list buffer.
-(put 'Info-read-node-name-1 'completion-base-size-function
-     (lambda ()
-       (if (string-match "\\`([^)]*\\'"
-                        (or completion-common-substring
-                            (minibuffer-completion-contents)))
-          1
-        0)))
+
 
 (defun Info-read-node-name (prompt)
   (let* ((completion-ignore-case t)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]