diff options
author | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2015-12-29 21:39:08 -0800 |
commit | ec0a80cc283badc7f7fd5ef78512dde6d34b1355 (patch) | |
tree | 7190e0fb3d4aa06018d8cf997f06b806fb09a9c8 /lisp/saveplace.el | |
parent | d259328fb87db8cc67d52771efcfa653e52c5b71 (diff) | |
parent | e823c34072bf045800d91e12c7ddb61fa23c6e30 (diff) | |
download | emacs-25-merge.tar.gz |
Merge emacs-25 into master (using imerge)emacs-25-merge
Diffstat (limited to 'lisp/saveplace.el')
-rw-r--r-- | lisp/saveplace.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index fe54743e393..5bbcd79927d 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -158,6 +158,8 @@ file: \(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 @@ -178,6 +180,8 @@ file: ;; 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 @@ -310,6 +314,8 @@ may have changed) back to `save-place-alist'." ;; 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)))))) @@ -331,6 +337,8 @@ may have changed) back to `save-place-alist'." "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) |