\(setq-default save-place t)"
(interactive "P")
(if (not (or buffer-file-name (and (derived-mode-p 'dired-mode)
+ (boundp 'dired-subdir-alist)
+ dired-subdir-alist
(dired-current-directory))))
(message "Buffer `%s' not visiting a file or directory" (buffer-name))
(setq save-place (if parg
;; will be saved again when Emacs is killed.
(or save-place-loaded (load-save-place-alist-from-file))
(let* ((directory (and (derived-mode-p 'dired-mode)
+ (boundp 'dired-subdir-alist)
+ dired-subdir-alist
(dired-current-directory)))
(item (or buffer-file-name
(and directory
;; save-place checks buffer-file-name too, but we can avoid
;; overhead of function call by checking here too.
(and (or buffer-file-name (and (derived-mode-p 'dired-mode)
+ (boundp 'dired-subdir-alist)
+ dired-subdir-alist
(dired-current-directory)))
(save-place-to-alist))
(setq buf-list (cdr buf-list))))))
"Position the point in a Dired buffer."
(or save-place-loaded (load-save-place-alist-from-file))
(let* ((directory (and (derived-mode-p 'dired-mode)
+ (boundp 'dired-subdir-alist)
+ dired-subdir-alist
(dired-current-directory)))
(cell (assoc (and directory
(expand-file-name (if (consp directory)