Mercurial > emacs
changeset 33804:a4983aa962bb
(dired-add-entry): Don't call dired-get-filename
with `no-dir'; we want the directory part to be able to remove
it.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 23 Nov 2000 13:53:12 +0000 |
parents | 1f71c752b328 |
children | 7d3fd66a3ac3 |
files | lisp/dired-aux.el |
diffstat | 1 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired-aux.el Thu Nov 23 12:36:52 2000 +0000 +++ b/lisp/dired-aux.el Thu Nov 23 13:53:12 2000 +0000 @@ -806,10 +806,10 @@ (setq filename (directory-file-name filename)) ;; Entry is always for files, even if they happen to also be directories (let* ((opoint (point)) - (cur-dir (dired-current-directory)) - (orig-file-name filename) - (directory (if relative cur-dir (file-name-directory filename))) - reason) + (cur-dir (dired-current-directory)) + (orig-file-name filename) + (directory (if relative cur-dir (file-name-directory filename))) + reason) (setq filename (if relative (file-relative-name filename directory) @@ -822,14 +822,14 @@ (if (eq (following-char) ?\r) (dired-unhide-subdir)) ;; We are already where we should be, except when - ;; point is before the subdir line or its total line. + ;; point is before the subdir line or its total line. (let ((p (dired-after-subdir-garbage cur-dir))) (if (< (point) p) (goto-char p)))) ;; else try to find correct place to insert (if (dired-goto-subdir directory) - (progn;; unhide if necessary - (if (looking-at "\r");; point is at end of subdir line + (progn ;; unhide if necessary + (if (looking-at "\r") ;; point is at end of subdir line (dired-unhide-subdir)) ;; found - skip subdir and `total' line ;; and uninteresting files like . and .. @@ -841,7 +841,7 @@ (beginning-of-line) (setq opoint (point)) (dired-add-entry-do-indentation marker-char) - ;; don't expand `.'. Show just the file name within directory. + ;; don't expand `.'. Show just the file name within directory. (let ((default-directory directory)) (insert-directory filename (concat dired-actual-switches "d"))) @@ -850,7 +850,7 @@ ;; the relative one. That may be hard to fix since it ;; is probably controlled by something in ftp. (goto-char opoint) - (let ((inserted-name (dired-get-filename 'no-dir))) + (let ((inserted-name (dired-get-filename))) (if (file-name-directory inserted-name) (progn (end-of-line) @@ -858,11 +858,11 @@ (insert filename) (forward-char 1)) (forward-line 1))) - ;; Give each line a text property recording info about it. + ;; Give each line a text property recording info about it. (dired-insert-set-properties opoint (point)) (forward-line -1) - (if dired-after-readin-hook;; the subdir-alist is not affected... - (save-excursion;; ...so we can run it right now: + (if dired-after-readin-hook ;; the subdir-alist is not affected... + (save-excursion ;; ...so we can run it right now: (save-restriction (beginning-of-line) (narrow-to-region (point) (save-excursion @@ -871,9 +871,9 @@ (dired-move-to-filename)) ;; return nil if all went well nil)) - (if reason ; don't move away on failure + (if reason ; don't move away on failure (goto-char opoint)) - (not reason))) ; return t on success, nil else + (not reason))) ; return t on success, nil else ;; This is a separate function for the sake of nested dired format. (defun dired-add-entry-do-indentation (marker-char)