changeset 81991:f41d4ecf6cb4

(locate-dominating-file): Add comment.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 20 Jul 2007 04:00:37 +0000
parents cd7d70b6659e
children df7b7863742c
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Fri Jul 20 03:59:03 2007 +0000
+++ b/lisp/files.el	Fri Jul 20 04:00:37 2007 +0000
@@ -720,6 +720,10 @@
           ;; Abbreviate, so as to stop when we cross ~/.
           (dir (abbreviate-file-name (file-name-as-directory file)))
           files)
+      ;; As a heuristic, we stop looking up the hierarchy of directories as
+      ;; soon as we find a directory belonging to another user.  This should
+      ;; save us from looking in things like /net and /afs.  This assumes
+      ;; that all the files inside a project belong to the same user.
       (while (and dir (equal user (nth 2 (file-attributes dir))))
         (if (setq files (directory-files dir 'full regexp))
             (throw 'found (car files))