diff options
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/dired.el | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 398b058a874..e799ead207b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-10-18 Glenn Morris <rgm@gnu.org> | 1 | 2012-10-18 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * dired.el (dired-sort-toggle): Some ls implementations only allow | ||
| 4 | a single option string. (Bug#12666) | ||
| 5 | |||
| 3 | * minibuffer.el (completion-cycle-threshold): Doc fix. | 6 | * minibuffer.el (completion-cycle-threshold): Doc fix. |
| 4 | 7 | ||
| 5 | 2012-10-17 Kenichi Handa <handa@gnu.org> | 8 | 2012-10-17 Kenichi Handa <handa@gnu.org> |
diff --git a/lisp/dired.el b/lisp/dired.el index a17e1805339..a4bc16caebf 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3546,8 +3546,15 @@ With a prefix argument, edit the current listing switches instead." | |||
| 3546 | (setq dired-actual-switches | 3546 | (setq dired-actual-switches |
| 3547 | (replace-match "" t t dired-actual-switches 3)))) | 3547 | (replace-match "" t t dired-actual-switches 3)))) |
| 3548 | ;; Now, if we weren't sorting by date before, add the -t switch. | 3548 | ;; Now, if we weren't sorting by date before, add the -t switch. |
| 3549 | ;; Some simple-minded ls implementations (eg ftp servers) only | ||
| 3550 | ;; allow a single option string, so try not to add " -t" if possible. | ||
| 3549 | (unless sorting-by-date | 3551 | (unless sorting-by-date |
| 3550 | (setq dired-actual-switches (concat dired-actual-switches " -t")))) | 3552 | (setq dired-actual-switches |
| 3553 | (concat dired-actual-switches | ||
| 3554 | (if (string-match-p "\\`-[[:alnum:]]+\\'" | ||
| 3555 | dired-actual-switches) | ||
| 3556 | "t" | ||
| 3557 | " -t"))))) | ||
| 3551 | (dired-sort-set-mode-line) | 3558 | (dired-sort-set-mode-line) |
| 3552 | (revert-buffer)) | 3559 | (revert-buffer)) |
| 3553 | 3560 | ||