emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105847: * lisp/minibuffer.el (comple


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105847: * lisp/minibuffer.el (completion-file-name-table): Keep track of errors.
Date: Mon, 19 Sep 2011 21:06:29 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105847
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9160
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2011-09-19 21:06:29 -0400
message:
  * lisp/minibuffer.el (completion-file-name-table): Keep track of errors.
  (completion-table-with-predicate): Handle the case where pred1 is nil.
  * lisp/pcomplete.el (pcomplete-completions-at-point): Simplify.
modified:
  lisp/ChangeLog
  lisp/minibuffer.el
  lisp/pcomplete.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-09-19 21:14:23 +0000
+++ b/lisp/ChangeLog    2011-09-20 01:06:29 +0000
@@ -1,3 +1,9 @@
+2011-09-20  Stefan Monnier  <address@hidden>
+
+       * minibuffer.el (completion-file-name-table): Keep track of errors.
+       (completion-table-with-predicate): Handle the case where pred1 is nil.
+       * pcomplete.el (pcomplete-completions-at-point): Simplify.
+
 2011-09-19  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/debug.el (debugger-args): Give it a docstring.

=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el        2011-09-02 00:36:58 +0000
+++ b/lisp/minibuffer.el        2011-09-20 01:06:29 +0000
@@ -322,14 +322,15 @@
     (test-completion string table pred2))
    (t
     (or (complete-with-action action table string
-                              (if (null pred2) pred1
+                              (if (not (and pred1 pred2))
+                                  (or pred1 pred2)
                                 (lambda (x)
                                   ;; Call `pred1' first, so that `pred2'
                                   ;; really can't tell that `x' is in table.
-                                  (if (funcall pred1 x) (funcall pred2 x)))))
+                                  (and (funcall pred1 x) (funcall pred2 x)))))
         ;; If completion failed and we're not applying pred1 strictly, try
         ;; again without pred1.
-        (and (not strict)
+        (and (not strict) pred1 pred2
              (complete-with-action action table string pred2))))))
 
 (defun completion-table-in-turn (&rest tables)
@@ -1774,7 +1775,7 @@
 
 (defun completion-file-name-table (string pred action)
   "Completion table for file names."
-  (ignore-errors
+  (with-demoted-errors
     (cond
      ((eq action 'metadata) '(metadata (category . file)))
      ((eq (car-safe action) 'boundaries)

=== modified file 'lisp/pcomplete.el'
--- a/lisp/pcomplete.el 2011-08-23 05:25:17 +0000
+++ b/lisp/pcomplete.el 2011-09-20 01:06:29 +0000
@@ -515,14 +515,13 @@
               (pred
                ;; Pare it down, if applicable.
                (when (and pcomplete-use-paring pcomplete-seen)
-                 (setq pcomplete-seen
-                       (mapcar (lambda (f)
-                                 (funcall pcomplete-norm-func
-                                          (directory-file-name f)))
-                               pcomplete-seen))
                  ;; Capture the dynbound values for later use.
                  (let ((norm-func pcomplete-norm-func)
-                       (seen pcomplete-seen))
+                       (seen
+                       (mapcar (lambda (f)
+                                 (funcall pcomplete-norm-func
+                                          (directory-file-name f)))
+                               pcomplete-seen)))
                    (lambda (f)
                      (not (member
                            (funcall norm-func (directory-file-name f))


reply via email to

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