880 |
Should not fail even on completely garbaged buffers. |
Should not fail even on completely garbaged buffers. |
881 |
Preserves old cursor, marks/flags, hidden-p." |
Preserves old cursor, marks/flags, hidden-p." |
882 |
(widen) ; just in case user narrowed |
(widen) ; just in case user narrowed |
883 |
(let ((opoint (point)) |
(let ((modflag (buffer-modified-p)) |
884 |
|
(opoint (point)) |
885 |
(ofile (dired-get-filename nil t)) |
(ofile (dired-get-filename nil t)) |
886 |
(mark-alist nil) ; save marked files |
(mark-alist nil) ; save marked files |
887 |
(hidden-subdirs (dired-remember-hidden)) |
(hidden-subdirs (dired-remember-hidden)) |
908 |
(save-excursion ; hide subdirs that were hidden |
(save-excursion ; hide subdirs that were hidden |
909 |
(dolist (dir hidden-subdirs) |
(dolist (dir hidden-subdirs) |
910 |
(if (dired-goto-subdir dir) |
(if (dired-goto-subdir dir) |
911 |
(dired-hide-subdir 1))))) |
(dired-hide-subdir 1)))) |
912 |
|
(unless modflag (restore-buffer-modified-p nil))) |
913 |
;; outside of the let scope |
;; outside of the let scope |
914 |
;;; Might as well not override the user if the user changed this. |
;;; Might as well not override the user if the user changed this. |
915 |
;;; (setq buffer-read-only t) |
;;; (setq buffer-read-only t) |
916 |
) |
) |
917 |
|
|
1709 |
(setq dir (expand-file-name dir))) |
(setq dir (expand-file-name dir))) |
1710 |
(if (string-match (concat "^" (regexp-quote dir)) file) |
(if (string-match (concat "^" (regexp-quote dir)) file) |
1711 |
(substring file (match-end 0)) |
(substring file (match-end 0)) |
1712 |
;;; (or no-error |
;;; (or no-error |
1713 |
;;; (error "%s: not in directory tree growing at %s" file dir)) |
;;; (error "%s: not in directory tree growing at %s" file dir)) |
1714 |
file)) |
file)) |
1715 |
|
|