diff options
author | Juri Linkov <juri@linkov.net> | 2015-12-22 02:14:47 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2015-12-22 02:14:47 +0200 |
commit | 33efb6d60614131e1504b29885bf8b82f7c1b3cb (patch) | |
tree | 00821b01240dc15c8040bc8c0a70f77b24d75e64 | |
parent | 5443f4cd58f7db981eab90e6fe7bf0ce0808d576 (diff) |
* lisp/saveplace.el (toggle-save-place, save-place-to-alist)
(save-places-to-alist, save-place-dired-hook):
Check for dired-subdir-alist. (Bug#19851)
-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 fe54743e39..5bbcd79927 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) |