summaryrefslogtreecommitdiff
path: root/lisp/dired-aux.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-04-12 05:12:33 +0000
committerRichard M. Stallman <rms@gnu.org>1994-04-12 05:12:33 +0000
commita4730db558b328cf615d9bf54a91fa50bfeb60e4 (patch)
tree630afe44f9b4dbc2c3ca59bdfd0560d3067afff7 /lisp/dired-aux.el
parent2c0f911991b713070b50b59fb37631c01cf76ab8 (diff)
downloademacs-a4730db558b328cf615d9bf54a91fa50bfeb60e4.tar.gz
(dired-add-entry): Set opoint at beginning of line.
No need to explicitly discard direcory from file name.
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r--lisp/dired-aux.el12
1 files changed, 3 insertions, 9 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index b01ba220433..16b829d9489 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -768,22 +768,16 @@ a prefix arg lets you edit the `ls' switches used for the new listing."
(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