[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112406: Fix Dired when ls-lisp is us
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112406: Fix Dired when ls-lisp is used and the -a switch is not used. |
Date: |
Sat, 27 Apr 2013 19:55:29 +0300 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112406
author: Ingo Lohmar <address@hidden>
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2013-04-27 19:55:29 +0300
message:
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.
modified:
lisp/ChangeLog
lisp/ls-lisp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-04-27 13:32:53 +0000
+++ b/lisp/ChangeLog 2013-04-27 16:55:29 +0000
@@ -1,3 +1,10 @@
+2013-04-27 Ingo Lohmar <address@hidden> (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 <address@hidden>
* emacs-lisp/package.el (package-autoload-ensure-default-file):
=== modified file 'lisp/ls-lisp.el'
--- a/lisp/ls-lisp.el 2013-01-01 09:11:05 +0000
+++ b/lisp/ls-lisp.el 2013-04-27 16:55:29 +0000
@@ -404,6 +404,13 @@
;; 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112406: Fix Dired when ls-lisp is used and the -a switch is not used.,
Eli Zaretskii <=