[EMAIL PROTECTED] (Ping Liang) writes:
> I have never needed to deal with Windows/Unix issues before, so I am
> not familiar with directory-sep-char. I guess that there must be a
> better way to deal with this if it is to be deprecated.
It is deprecated in GNU Emacs. I am not sure of its status in XEmacs
(it appears it is still needed there). The reason for deprecating it
is clearly illustrated by this particular problem.
I think the correct fix is to only bind directory-sep-char around the
one line of code that requires it:
(defun jde-find-project-file (dir)
"Finds the next project file upwards in the directory tree
from DIR. Returns nil if it cannot find a project file in DIR
or an ascendant directory."
(let ((file
(let (directory-sep-char ?/) ;; Override NT/XEmacs setting
(find jde-project-file-name
(directory-files dir) :test 'string=))))
(if file
(expand-file-name file dir)
(if (not (jde-root-dir-p dir))
(jde-find-project-file (expand-file-name "../" dir))))))
--
Jason Rumney