summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2020-12-30 13:48:45 +0200
committerDmitry Gutov <dgutov@yandex.ru>2020-12-30 13:48:55 +0200
commit13b59c690ada05f670d8056a6710045b22097c88 (patch)
treee9ae7dbb699422de3258969eb21f44ea8cf3b45c /etc
parentdd662fc972a75df71cdaa25a2d763d1592df1eb8 (diff)
downloademacs-13b59c690ada05f670d8056a6710045b22097c88.tar.gz
Add 'project-relative' as value for 'xref-file-name-display'
* lisp/progmodes/xref.el (xref-file-name-display): Document new value. (xref-location-group ((l xref-file-location))): Handle the new value. (xref--project-root): Extract from the default method of 'xref-backend-references' so it can be used in above's new code. Also fix an old bug in the "backward compat" branch. * lisp/progmodes/xref.el (xref--project-root-memo): New variable. * test/lisp/progmodes/xref-tests.el: Add test cases for the three possible settings of 'xref-file-name-display'. Co-authored-by: Tobias Rittweiler <trittweiler@gmail.com>
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 765c032dc47..1b49b015608 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1302,6 +1302,11 @@ have been renamed to have "proper" public names and documented
('xref-show-definitions-buffer' and
'xref-show-definitions-buffer-at-bottom').
+---
+*** New value 'project-relative' for 'xref-file-name-display'
+If chosen, file names in *xref* buffers will be displayed relative
+to the 'project-root' of the current project, when available.
+
** json.el
---