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