Mercurial > emacs
changeset 6824:ec94aee0bf55
(dired-add-entry): Set opoint at beginning of line.
No need to explicitly discard direcory from file name.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 12 Apr 1994 05:12:33 +0000 |
parents | e0680426ff8e |
children | f70a517ae9e2 |
files | lisp/dired-aux.el |
diffstat | 1 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired-aux.el Tue Apr 12 04:39:34 1994 +0000 +++ b/lisp/dired-aux.el Tue Apr 12 05:12:33 1994 +0000 @@ -768,22 +768,16 @@ (dired-goto-next-nontrivial-file)) ;; not found (throw 'not-found "Subdir not found"))) - ;; found and point is at The Right Place: - (let (buffer-read-only (opoint (point))) + (let (buffer-read-only opoint) (beginning-of-line) + (setq opoint (point)) (dired-add-entry-do-indentation marker-char) - ;; don't expand `.' ! + ;; don't expand `.'. Show just the file name within directory. (let ((default-directory directory)) (insert-directory filename (concat dired-actual-switches "d"))) (dired-insert-set-properties opoint (point)) (forward-line -1) - ;; We want to have the non-directory part, only: - (let* ((beg (dired-move-to-filename t)) ; error for strange output - (end (dired-move-to-end-of-filename))) - (setq filename (buffer-substring beg end)) - (delete-region beg end) - (insert (file-name-nondirectory filename))) (if dired-after-readin-hook;; the subdir-alist is not affected... (save-excursion;; ...so we can run it right now: (save-restriction