comparison lisp/dired/dired.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 0293115a14e9
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
454 (if failed (kill-buffer buffer)))) 454 (if failed (kill-buffer buffer))))
455 ;; No need to narrow since the whole buffer contains just 455 ;; No need to narrow since the whole buffer contains just
456 ;; dired-readin's output, nothing else. The hook can 456 ;; dired-readin's output, nothing else. The hook can
457 ;; successfully use dired functions (e.g. dired-get-filename) 457 ;; successfully use dired functions (e.g. dired-get-filename)
458 ;; as the subdir-alist has been built in dired-readin. 458 ;; as the subdir-alist has been built in dired-readin.
459 (run-hooks 'dired-after-readin-hook) 459 (let ((buffer-read-only nil))
460 (run-hooks 'dired-after-readin-hook))
460 (goto-char (point-min)) 461 (goto-char (point-min))
461 (dired-initial-position dirname)) 462 (dired-initial-position dirname))
462 (set-buffer old-buf) 463 (set-buffer old-buf)
463 buffer)) 464 buffer))
464 465
3105 (boundary (dired-subdir-max))) 3106 (boundary (dired-subdir-max)))
3106 (while (and (not found) 3107 (while (and (not found)
3107 ;; filenames are preceded by SPC, this makes 3108 ;; filenames are preceded by SPC, this makes
3108 ;; the search faster (e.g. for the filename "-"!). 3109 ;; the search faster (e.g. for the filename "-"!).
3109 (search-forward (concat " " base) boundary 'move)) 3110 (search-forward (concat " " base) boundary 'move))
3110 ;; Match could have BASE just as initial substring or 3111 ;; Match could have BASE just as initial substring
3111 ;; or in permission bits or date or 3112 ;; or in permission bits or date or
3112 ;; not be a proper filename at all: 3113 ;; not be a proper filename at all:
3113 (if (equal base (dired-get-filename 'no-dir t)) 3114 (if (equal base (dired-get-filename 'no-dir t))
3114 ;; Must move to filename since an (actually 3115 ;; Must move to filename since an (actually
3115 ;; correct) match could have been elsewhere on the 3116 ;; correct) match could have been elsewhere on the