]> code.delx.au - gnu-emacs/commitdiff
Prune erroneous values in dired-get-marked-files
authorLeo Liu <sdl.web@gmail.com>
Fri, 18 Jan 2013 18:35:44 +0000 (02:35 +0800)
committerLeo Liu <sdl.web@gmail.com>
Fri, 18 Jan 2013 18:35:44 +0000 (02:35 +0800)
Fixes: debbugs:13152
lisp/ChangeLog
lisp/dired.el

index cd7a013d55cf59d6ec8f241355fba552744df56e..7be8224ae65205943a897a526d9b25b19f08a3a2 100644 (file)
@@ -1,3 +1,8 @@
+2013-01-18  Leo Liu  <sdl.web@gmail.com>
+
+       * dired.el (dired-get-marked-files): Prune erroneous values due to
+       last change.  (Bug#13152)
+
 2013-01-17  Glenn Morris  <rgm@gnu.org>
 
        * progmodes/etags.el (tags-table-check-computed-list):
index 3d01c7b0924b33f0e60f44ab034b9533584dcde8..76809f992cc1d6688b7fd7f58d36c9e7e882a930 100644 (file)
@@ -620,12 +620,14 @@ Optional third argument FILTER, if non-nil, is a function to select
 If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
 return (t FILENAME) instead of (FILENAME).
 Don't use that together with FILTER."
-  (let* ((all-of-them
-         (save-excursion
-           (dired-map-over-marks
-            (dired-get-filename localp 'no-error-if-not-filep)
-            arg nil distinguish-one-marked)))
-        result)
+  (let ((all-of-them
+        (save-excursion
+          (delq nil (dired-map-over-marks
+                     (dired-get-filename localp 'no-error-if-not-filep)
+                     arg nil distinguish-one-marked))))
+       result)
+    (when (equal all-of-them '(t))
+      (setq all-of-them nil))
     (if (not filter)
        (if (and distinguish-one-marked (eq (car all-of-them) t))
            all-of-them