aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorIngo Lohmar2013-04-27 19:55:29 +0300
committerEli Zaretskii2013-04-27 19:55:29 +0300
commita81ee1eb7b6160fe188328e14a4e1239596c6af8 (patch)
tree37597ef181cfeaca62c587a396e7f0b1b1b1d75d /lisp
parentb8dd59f747ffd09a7fa4df2e36924f435ee61a90 (diff)
downloademacs-a81ee1eb7b6160fe188328e14a4e1239596c6af8.tar.gz
emacs-a81ee1eb7b6160fe188328e14a4e1239596c6af8.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/ls-lisp.el7
2 files changed, 14 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 61d6af86d2e..6ae6e33824c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12013-04-27 Ingo Lohmar <i.lohmar@gmail.com> (tiny change)
2
3 * ls-lisp.el (ls-lisp-insert-directory): If no files are
4 displayed, move point to after the totals line. See
5 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00677.html
6 for the details.
7
12013-04-27 Stefan Monnier <monnier@iro.umontreal.ca> 82013-04-27 Stefan Monnier <monnier@iro.umontreal.ca>
2 9
3 * emacs-lisp/package.el (package-autoload-ensure-default-file): 10 * emacs-lisp/package.el (package-autoload-ensure-default-file):
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 70ee4394b88..60d6b7b7ba5 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -404,6 +404,13 @@ not contain `d', so that a full listing is expected."
404 ;; the wildcard; let's say something similar. 404 ;; the wildcard; let's say something similar.
405 (insert "(No match)\n")) 405 (insert "(No match)\n"))
406 (insert (format "total %.0f\n" (fceiling (/ sum 1024.0)))))) 406 (insert (format "total %.0f\n" (fceiling (/ sum 1024.0))))))
407 ;; dired-insert-directory exprects to find point after the
408 ;; text. But if the listinmg is empty, as e.g. in empty
409 ;; directories with -a removed from switches, point will be
410 ;; before the inserted text, and dired-insert-directory will
411 ;; not indent the listing correctly. Going to the end of the
412 ;; buffer fixes that.
413 (unless files (goto-char (point-max)))
407 (if (memq ?R switches) 414 (if (memq ?R switches)
408 ;; List the contents of all directories recursively. 415 ;; List the contents of all directories recursively.
409 ;; cadr of each element of `file-alist' is t for 416 ;; cadr of each element of `file-alist' is t for