comparison lisp/dired.el @ 5113:193cd8b36b41

(dired-readin-insert): Expand default-directory and dirname before comparing them. (dired-internal-noselect): Set default-directory to abbreviated name.
author Richard M. Stallman <rms@gnu.org>
date Mon, 22 Nov 1993 09:29:51 +0000
parents 4bb3a179a87f
children da6f8aa6c0aa
comparison
equal deleted inserted replaced
5112:4bb3a179a87f 5113:193cd8b36b41
396 (set-buffer buffer) 396 (set-buffer buffer)
397 (if (not new-buffer-p) ; existing buffer ... 397 (if (not new-buffer-p) ; existing buffer ...
398 (if switches ; ... but new switches 398 (if switches ; ... but new switches
399 (dired-sort-other switches)) ; this calls dired-revert 399 (dired-sort-other switches)) ; this calls dired-revert
400 ;; Else a new buffer 400 ;; Else a new buffer
401 (setq default-directory (if (file-directory-p dirname) 401 (setq default-directory
402 dirname 402 (abbreviate-file-name
403 (file-name-directory dirname))) 403 (if (file-directory-p dirname)
404 dirname
405 (file-name-directory dirname))))
404 (or switches (setq switches dired-listing-switches)) 406 (or switches (setq switches dired-listing-switches))
405 (dired-mode dirname switches) 407 (dired-mode dirname switches)
406 ;; default-directory and dired-actual-switches are set now 408 ;; default-directory and dired-actual-switches are set now
407 ;; (buffer-local), so we can call dired-readin: 409 ;; (buffer-local), so we can call dired-readin:
408 (let ((failed t)) 410 (let ((failed t))