emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r102037: * lisp/emacs-lisp/find-func.


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102037: * lisp/emacs-lisp/find-func.el (find-library): Use test-completion.
Date: Thu, 21 Oct 2010 23:17:26 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102037
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2010-10-21 23:17:26 -0400
message:
  * lisp/emacs-lisp/find-func.el (find-library): Use test-completion.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/find-func.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-10-21 20:12:38 +0000
+++ b/lisp/ChangeLog    2010-10-22 03:17:26 +0000
@@ -1,7 +1,10 @@
+2010-10-22  Stefan Monnier  <address@hidden>
+
+       * emacs-lisp/find-func.el (find-library): Use test-completion.
+
 2010-10-21  Lars Magne Ingebrigtsen  <address@hidden>
 
-       * newcomment.el (comment-dwim): Fix the intentation in the doc
-       string.
+       * newcomment.el (comment-dwim): Fix the intentation in the doc string.
 
 010-10-21  Michael Albinus  <address@hidden>
 
@@ -13,15 +16,15 @@
 
 2010-10-21  Daiki Ueno  <address@hidden>
 
-       * hexl.el (hexl-mode, hexl-mode-exit): Tweak
-       revert-buffer-function to inhibit auto-mode-alist (Bug#7252).
+       * hexl.el (hexl-mode, hexl-mode-exit):
+       Tweak revert-buffer-function to inhibit auto-mode-alist (Bug#7252).
        (hexl-revert-buffer-function): New function.
        (hexl-before-revert-hook, hexl-after-revert-hook): Abolish.
 
 2010-10-19  Alan Mackenzie  <address@hidden>
 
-       * progmodes/cc-langs.el (c-type-decl-prefix-key): C++ bit: move
-       "\(const\|throw\|volatile\)\>" nearer the start of the regexp, so
+       * progmodes/cc-langs.el (c-type-decl-prefix-key): C++ bit:
+       Move "\(const\|throw\|volatile\)\>" nearer the start of the regexp, so
        that these keywords aren't wrongly matched as identifiers.
 
        * progmodes/cc-mode.el (c-before-change, c-after-change): Move the

=== modified file 'lisp/emacs-lisp/find-func.el'
--- a/lisp/emacs-lisp/find-func.el      2010-01-13 08:35:10 +0000
+++ b/lisp/emacs-lisp/find-func.el      2010-10-22 03:17:26 +0000
@@ -213,6 +213,8 @@
   (interactive
    (let* ((dirs (or find-function-source-path load-path))
           (suffixes (find-library-suffixes))
+          (table (apply-partially 'locate-file-completion-table
+                                  dirs 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
@@ -226,16 +228,12 @@
                         (thing-at-point 'symbol))
                     (error nil))
                 (thing-at-point 'symbol))))
-     (when def
-       (setq def (and (locate-file-completion-table
-                       dirs suffixes def nil 'lambda)
-                      def)))
+     (when (and def (not (test-completion def table)))
+       (setq def nil))
      (list
       (completing-read (if def (format "Library name (default %s): " def)
                         "Library name: ")
-                      (apply-partially 'locate-file-completion-table
-                                        dirs suffixes)
-                       nil nil nil nil def))))
+                      table 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]