mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
project-vc-dir: Use truenames
* lisp/progmodes/project.el (project-vc-dir): When called interactively, call file-truename on the project root first. * etc/NEWS: Document the change.
This commit is contained in:
parent
31eaf18276
commit
1d91d9b717
2 changed files with 20 additions and 4 deletions
10
etc/NEWS
10
etc/NEWS
|
|
@ -70,6 +70,16 @@ check out the repository to prepare a patch for the package maintainer.
|
|||
---
|
||||
*** Messages from Ansible are now recognized.
|
||||
|
||||
** Project
|
||||
|
||||
---
|
||||
*** 'C-x p v' ('project-vc-dir') uses the truename of the project root.
|
||||
'C-x v d' already did this when used interactively. So e.g. if 'link/'
|
||||
is a symbolic link to 'target/', then 'C-x v d link/ RET' is the same as
|
||||
'C-x v d target/ RET'. Now the same is true for 'C-x p v', so that if
|
||||
the project root is a symbolic link, 'C-x p v' first finds the truename
|
||||
of the directory named by that link, and then opens VC-Dir there.
|
||||
|
||||
|
||||
* New Modes and Packages in Emacs 32.1
|
||||
|
||||
|
|
|
|||
|
|
@ -1608,10 +1608,16 @@ The current buffer's `default-directory' is available as part of
|
|||
(dired (project-root (project-current t))))
|
||||
|
||||
;;;###autoload
|
||||
(defun project-vc-dir ()
|
||||
"Run VC-Dir in the current project's root."
|
||||
(interactive)
|
||||
(vc-dir (project-root (project-current t))))
|
||||
(defun project-vc-dir (&optional truenameize)
|
||||
"Run VC-Dir in the current project's root.
|
||||
If TRUENAMEIZE is non-nil, as it is interactively, then if the project
|
||||
root is a symbolic link, resolve it first. This matches the behaviour
|
||||
of \\[vc-dir] when invoked interactively."
|
||||
(interactive "p")
|
||||
(let ((root (project-root (project-current t))))
|
||||
(vc-dir (if truenameize
|
||||
(abbreviate-file-name (file-truename root))
|
||||
root))))
|
||||
|
||||
;;;###autoload
|
||||
(defun project-customize-dirlocals ()
|
||||
|
|
|
|||
Loading…
Reference in a new issue