diff options
author | Juri Linkov <juri@jurta.org> | 2013-12-20 22:20:39 +0200 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2013-12-20 22:20:39 +0200 |
commit | 1d42e5b6396fd7234ff94e6fec7fd4f39d1faddb (patch) | |
tree | 2824c1180224b4c3ff60e61a3a3585de197efdab /lisp/dired.el | |
parent | eea2cba48e1ad87992a896c75d6d2ed8afb24a30 (diff) | |
download | emacs-1d42e5b6396fd7234ff94e6fec7fd4f39d1faddb.tar.gz |
* lisp/saveplace.el (save-place-to-alist): Add `dired-filename' as
a position when `dired-directory' is non-nil. Check integer
positions with `integerp'.
(toggle-save-place, save-places-to-alist): Add check for
`dired-directory'.
(save-place-find-file-hook): Check integer positions with
`integerp'.
(save-place-dired-hook): Use `dired-goto-file' when
`dired-filename' is found in the assoc list. Check integer
positions with `integerp'.
(dired-initial-position-hook): Rename from `dired-initial-point-hook'.
* lisp/dired.el (dired-initial-position-hook): Rename back from
`dired-initial-point-hook'.
(dired-initial-position): Rename `dired-initial-point-hook' to
`dired-initial-position-hook'.
(dired-file-name-at-point): Doc fix.
Fixes: debbugs:15329
Diffstat (limited to 'lisp/dired.el')
-rw-r--r-- | lisp/dired.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 7e96bdfb87f..e971a70f20c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -220,7 +220,7 @@ with the buffer narrowed to the listing." ;; Note this can't simply be run inside function `dired-ls' as the hook ;; functions probably depend on the dired-subdir-alist to be OK. -(defcustom dired-initial-point-hook nil +(defcustom dired-initial-position-hook nil "This hook is used to position the point. It is run the function `dired-initial-position'." :group 'dired @@ -733,7 +733,9 @@ Don't use that together with FILTER." (defun dired-file-name-at-point () "Try to get a file name at point in the current dired buffer. -This hook is intended to be put in `file-name-at-point-functions'." +This hook is intended to be put in `file-name-at-point-functions'. +Note that it returns an abbreviated name that can't be used +as an argument to `dired-goto-file'." (let ((filename (dired-get-filename nil t))) (when filename (if (file-directory-p filename) @@ -2763,7 +2765,7 @@ It runs the hook `dired-initial-position-hook'." (and (featurep 'dired-x) dired-find-subdir (dired-goto-subdir dirname)) (if dired-trivial-filenames (dired-goto-next-nontrivial-file)) - (run-hooks 'dired-initial-point-hook)) + (run-hooks 'dired-initial-position-hook)) ;; These are hooks which make tree dired work. ;; They are in this file because other parts of dired need to call them. |