]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle when dired-directory is a cons in some Dired functions
authorTino Calancha <tino.calancha@gmail.com>
Fri, 21 Jul 2017 04:17:14 +0000 (13:17 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Fri, 21 Jul 2017 04:17:14 +0000 (13:17 +0900)
* lisp/dired-aux.el (dired-rename-subdir-1)
* lisp/dired-x.el (dired-mark-omitted):
Handle when dired-directory is a cons.

lisp/dired-aux.el
lisp/dired-x.el

index 095ce8ba89c2e52337591d305856e88b6b4f8b76..17dae6085dfb585f620ce13ae20feb7dea3cb929 100644 (file)
@@ -1623,10 +1623,14 @@ Special value `always' suppresses confirmation."
          (setq default-directory to
                dired-directory (expand-file-name;; this is correct
                                 ;; with and without wildcards
-                                (file-name-nondirectory dired-directory)
+                                (file-name-nondirectory (if (stringp dired-directory)
+                                                             dired-directory
+                                                           (car dired-directory)))
                                 to))
          (let ((new-name (file-name-nondirectory
-                          (directory-file-name dired-directory))))
+                          (directory-file-name (if (stringp dired-directory)
+                                                    dired-directory
+                                                  (car dired-directory))))))
            ;; try to rename buffer, but just leave old name if new
            ;; name would already exist (don't try appending "<%d>")
            (or (get-buffer new-name)
index 7ceb672bf2f0862c126e24de4a376e499be7149c..915550991d03bc127d97293d70374a05fb8e1ab3 100644 (file)
@@ -546,7 +546,9 @@ Should never be used as marker by the user or other packages.")
   (interactive)
   (let ((dired-omit-mode nil)) (revert-buffer)) ;; Show omitted files
   (dired-mark-unmarked-files (dired-omit-regexp) nil nil dired-omit-localp
-                             (dired-omit-case-fold-p dired-directory)))
+                             (dired-omit-case-fold-p (if (stringp dired-directory)
+                                                         dired-directory
+                                                       (car dired-directory)))))
 
 (defcustom dired-omit-extensions
   (append completion-ignored-extensions
@@ -591,7 +593,9 @@ This functions works by temporarily binding `dired-marker-char' to
             (let ((dired-marker-char dired-omit-marker-char))
               (when dired-omit-verbose (message "Omitting..."))
               (if (dired-mark-unmarked-files omit-re nil nil dired-omit-localp
-                                             (dired-omit-case-fold-p dired-directory))
+                                             (dired-omit-case-fold-p (if (stringp dired-directory)
+                                                                         dired-directory
+                                                                       (car dired-directory))))
                   (progn
                     (setq count (dired-do-kill-lines
                                 nil