From: Paul Eggert Date: Mon, 17 Apr 2017 06:36:26 +0000 (-0700) Subject: dired ‘M’ should not complain about ‘.’ and ‘..’ X-Git-Tag: emacs-26.0.90~521^2~614 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=47122295521c63febe9fc64680430812da3a3acf;p=emacs.git dired ‘M’ should not complain about ‘.’ and ‘..’ * lisp/dired-aux.el (dired-do-redisplay): Allow redisplay of ‘.’ and ‘..’ (Bug#26528). --- diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index d7ca0527879..ec07f9bf735 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1266,12 +1266,14 @@ See Info node `(emacs)Subdir switches' for more details." ;; message much faster than making dired-map-over-marks show progress (dired-uncache (if (consp dired-directory) (car dired-directory) dired-directory)) - (dired-map-over-marks (let ((fname (dired-get-filename)) + (dired-map-over-marks (let ((fname (dired-get-filename nil t)) ;; Postpone readin hook till we map ;; over all marked files (Bug#6810). (dired-after-readin-hook nil)) - (message "Redisplaying... %s" fname) - (dired-update-file-line fname)) + (if (not fname) + (error "No file on this line") + (message "Redisplaying... %s" fname) + (dired-update-file-line fname))) arg) (run-hooks 'dired-after-readin-hook) (dired-move-to-filename)