emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/find-func.el,v
Date: Sat, 19 Apr 2008 03:33:15 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/04/19 03:33:13

Index: emacs-lisp/find-func.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/find-func.el,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -b -r1.88 -r1.89
--- emacs-lisp/find-func.el     29 Jan 2008 17:39:41 -0000      1.88
+++ emacs-lisp/find-func.el     19 Apr 2008 03:33:13 -0000      1.89
@@ -197,8 +197,8 @@
 (defun find-library (library)
   "Find the elisp source of LIBRARY."
   (interactive
-   (let* ((path (cons (or find-function-source-path load-path)
-                     (find-library-suffixes)))
+   (let* ((dirs (or find-function-source-path load-path))
+          (suffixes (find-library-suffixes))
          (def (if (eq (function-called-at-point) 'require)
                   ;; `function-called-at-point' may return 'require
                   ;; with `point' anywhere on this line.  So wrap the
@@ -213,11 +213,15 @@
                     (error nil))
                 (thing-at-point 'symbol))))
      (when def
-       (setq def (and (locate-file-completion def path 'test) def)))
+       (setq def (and (locate-file-completion-table
+                       dirs suffixes def nil 'lambda)
+                      def)))
      (list
       (completing-read (if def (format "Library name (default %s): " def)
                         "Library name: ")
-                      'locate-file-completion path nil nil nil def))))
+                      (apply-partially 'locate-file-completion-table
+                                        dirs suffixes)
+                       nil nil nil nil def))))
   (let ((buf (find-file-noselect (find-library-name library))))
     (condition-case nil (switch-to-buffer buf) (error (pop-to-buffer buf)))))
 




reply via email to

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