aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2004-11-22 05:07:07 +0000
committerStefan Monnier2004-11-22 05:07:07 +0000
commit87ae59e3680c70b7e284c0458c29cf5bc65d39ad (patch)
tree1d01c00720c4dabffa10df114b713222386aa429
parent8cd2540e1759cfa456b28691dc096d283cddcd2f (diff)
downloademacs-87ae59e3680c70b7e284c0458c29cf5bc65d39ad.tar.gz
emacs-87ae59e3680c70b7e284c0458c29cf5bc65d39ad.zip
(dired-align-file): Don't assume line starts with spaces.
-rw-r--r--lisp/dired.el50
1 files changed, 25 insertions, 25 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 4553683b181..de65b3b54ac 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1,7 +1,7 @@
1;;; dired.el --- directory-browsing commands 1;;; dired.el --- directory-browsing commands
2 2
3;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 97, 2000, 01, 03, 2004 3;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1997, 2000,
4;; Free Software Foundation, Inc. 4;; 2001, 2003, 2004 Free Software Foundation, Inc.
5 5
6;; Author: Sebastian Kremer <sk@thp.uni-koeln.de> 6;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
7;; Maintainer: FSF 7;; Maintainer: FSF
@@ -741,7 +741,7 @@ for a remote directory. This feature is used by Auto Revert Mode."
741 741
742(defun dired-readin () 742(defun dired-readin ()
743 "Read in a new dired buffer. 743 "Read in a new dired buffer.
744Differs from dired-insert-subdir in that it accepts 744Differs from `dired-insert-subdir' in that it accepts
745wildcards, erases the buffer, and builds the subdir-alist anew 745wildcards, erases the buffer, and builds the subdir-alist anew
746\(including making it buffer-local and clearing it first)." 746\(including making it buffer-local and clearing it first)."
747 747
@@ -858,10 +858,8 @@ BEG..END is the line where the file info is located."
858 (setq file (copy-marker file)) 858 (setq file (copy-marker file))
859 ;; Main loop. 859 ;; Main loop.
860 (goto-char beg) 860 (goto-char beg)
861 (skip-chars-forward " ") ;Skip to the first field.
861 (while (and (> other-col file-col) 862 (while (and (> other-col file-col)
862 (skip-chars-forward "^ ")
863 ;; Skip the spaces, and make sure there's at least one.
864 (> (skip-chars-forward " ") 0)
865 ;; Don't touch anything just before (and after) the 863 ;; Don't touch anything just before (and after) the
866 ;; beginning of the filename. 864 ;; beginning of the filename.
867 (> file (point))) 865 (> file (point)))
@@ -904,11 +902,13 @@ BEG..END is the line where the file info is located."
904 (insert-char ?\s spaces) 902 (insert-char ?\s spaces)
905 ;; Let's just make really sure we did not mess up. 903 ;; Let's just make really sure we did not mess up.
906 (unless (save-excursion 904 (unless (save-excursion
907 (equal (dired-move-to-filename) (marker-position file))) 905 (eq (dired-move-to-filename) (marker-position file)))
908 ;; Damn! We messed up: let's revert the change. 906 ;; Damn! We messed up: let's revert the change.
909 (delete-char (- spaces)))))) 907 (delete-char (- spaces)))))
908 ;; Now skip to next field.
909 (skip-chars-forward "^ ") (skip-chars-forward " "))
910 (set-marker file nil))))) 910 (set-marker file nil)))))
911 911
912 912
913(defun dired-insert-directory (dir switches &optional file-list wildcard hdr) 913(defun dired-insert-directory (dir switches &optional file-list wildcard hdr)
914 "Insert a directory listing of DIR, Dired style. 914 "Insert a directory listing of DIR, Dired style.
@@ -1482,22 +1482,22 @@ again for the directory tree.
1482Customization variables (rename this buffer and type \\[describe-variable] on each line 1482Customization variables (rename this buffer and type \\[describe-variable] on each line
1483for more info): 1483for more info):
1484 1484
1485 dired-listing-switches 1485 `dired-listing-switches'
1486 dired-trivial-filenames 1486 `dired-trivial-filenames'
1487 dired-shrink-to-fit 1487 `dired-shrink-to-fit'
1488 dired-marker-char 1488 `dired-marker-char'
1489 dired-del-marker 1489 `dired-del-marker'
1490 dired-keep-marker-rename 1490 `dired-keep-marker-rename'
1491 dired-keep-marker-copy 1491 `dired-keep-marker-copy'
1492 dired-keep-marker-hardlink 1492 `dired-keep-marker-hardlink'
1493 dired-keep-marker-symlink 1493 `dired-keep-marker-symlink'
1494 1494
1495Hooks (use \\[describe-variable] to see their documentation): 1495Hooks (use \\[describe-variable] to see their documentation):
1496 1496
1497 dired-before-readin-hook 1497 `dired-before-readin-hook'
1498 dired-after-readin-hook 1498 `dired-after-readin-hook'
1499 dired-mode-hook 1499 `dired-mode-hook'
1500 dired-load-hook 1500 `dired-load-hook'
1501 1501
1502Keybindings: 1502Keybindings:
1503\\{dired-mode-map}" 1503\\{dired-mode-map}"
@@ -1508,7 +1508,7 @@ Keybindings:
1508 (dired-advertise) ; default-directory is already set 1508 (dired-advertise) ; default-directory is already set
1509 (setq major-mode 'dired-mode 1509 (setq major-mode 'dired-mode
1510 mode-name "Dired" 1510 mode-name "Dired"
1511;; case-fold-search nil 1511 ;; case-fold-search nil
1512 buffer-read-only t 1512 buffer-read-only t
1513 selective-display t ; for subdirectory hiding 1513 selective-display t ; for subdirectory hiding
1514 mode-line-buffer-identification 1514 mode-line-buffer-identification
@@ -3021,7 +3021,7 @@ Thus, use \\[backward-page] to find the beginning of a group of errors."
3021;; So anything that does not contain these is sort "by name". 3021;; So anything that does not contain these is sort "by name".
3022 3022
3023(defvar dired-ls-sorting-switches "SXU" 3023(defvar dired-ls-sorting-switches "SXU"
3024 "String of `ls' switches \(single letters\) except `t' that influence sorting. 3024 "String of `ls' switches \(single letters\) except \"t\" that influence sorting.
3025 3025
3026This indicates to Dired which option switches to watch out for because they 3026This indicates to Dired which option switches to watch out for because they
3027will change the sorting order behavior of `ls'. 3027will change the sorting order behavior of `ls'.
@@ -3286,5 +3286,5 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3286 3286
3287(run-hooks 'dired-load-hook) ; for your customizations 3287(run-hooks 'dired-load-hook) ; for your customizations
3288 3288
3289;;; arch-tag: e1af7a8f-691c-41a0-aac1-ddd4d3c87517 3289;; arch-tag: e1af7a8f-691c-41a0-aac1-ddd4d3c87517
3290;;; dired.el ends here 3290;;; dired.el ends here