1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-06 20:49:33 +00:00

Fix Dired when ls-lisp is used and the -a switch is not used.

lisp/ls-lisp.el (ls-lisp-insert-directory): If no files are
 displayed, move point to after the totals line.  See
 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00677.html
 for the details.
This commit is contained in:
Ingo Lohmar 2013-04-27 19:55:29 +03:00 committed by Eli Zaretskii
parent b8dd59f747
commit a81ee1eb7b
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2013-04-27 Ingo Lohmar <i.lohmar@gmail.com> (tiny change)
* ls-lisp.el (ls-lisp-insert-directory): If no files are
displayed, move point to after the totals line. See
http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00677.html
for the details.
2013-04-27 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/package.el (package-autoload-ensure-default-file):

View File

@ -404,6 +404,13 @@ not contain `d', so that a full listing is expected."
;; the wildcard; let's say something similar.
(insert "(No match)\n"))
(insert (format "total %.0f\n" (fceiling (/ sum 1024.0))))))
;; dired-insert-directory exprects to find point after the
;; text. But if the listinmg is empty, as e.g. in empty
;; directories with -a removed from switches, point will be
;; before the inserted text, and dired-insert-directory will
;; not indent the listing correctly. Going to the end of the
;; buffer fixes that.
(unless files (goto-char (point-max)))
(if (memq ?R switches)
;; List the contents of all directories recursively.
;; cadr of each element of `file-alist' is t for