diff --git a/etc/NEWS b/etc/NEWS index 014184f1fa6..0a1c217d897 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -696,9 +696,11 @@ you can add this to your init script: (setopt project-switch-commands #'project-prefix-or-any-command) +--- *** New variable 'project-files-relative-names'. -Project backends can support it to improve the performance of their -'project-files' implementation when this variable is non-nil. +If it's non-nil, 'project-files' can return file names relative to the +project root. Project backends can use this to improve the performance +of their 'project-files' implementation. ** VC diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index b716d442aed..a3181340411 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -324,10 +324,11 @@ end it with `/'. DIR must be either `project-root' or one of (cdr project)) (defvar project-files-relative-names nil - "When non-nil, `project-files' is allowed to return relative names. -The names will be relative to the project root. And this can only -happen when all returned files are in the same directory. Meaning, the -DIRS argument has to be nil or have only one element.") + "If non-nil, `project-files' is allowed to return relative file names. +The file names should be relative to the project root. And this can +only happen when all returned files are in the same directory. +In other words, the DIRS argument of `project-files' has to be nil or a +list of only one element.") (cl-defgeneric project-files (project &optional dirs) "Return a list of files in directories DIRS in PROJECT.