Hi Adrian,
Adrian Aichner wrote:
Malcolm> On Windows there is an infinite loop in the function
p4-detect-p4 in p4.el.
<snip>
Thanks for reporting this problem.
If you would like to get involved a bit more, could you please provide
a patch, which also uses expand-file-name instead of concat?
Here's the patch
diff -u c:\apps\XEmacs\xemacs-packages\lisp\prog-modes\p4-orig.el
c:\apps\XEmacs\xemacs-packages\lisp\prog-modes\p4.el
--- c:\apps\XEmacs\xemacs-packages\lisp\prog-modes\p4-orig.el Wed Jul
17 16:56:30 2002
+++ c:\apps\XEmacs\xemacs-packages\lisp\prog-modes\p4.el Wed Jul 17
16:56:30 2002
@@ -2969,11 +2969,12 @@
(file-truename (buffer-file-name))))
(t default-directory) ;; hmm, use default
)))
- (while (not (or (string-match "^\\([a-zA-Z]:\\)?/$" p4-cfg-dir)
- (file-exists-p (concat p4-cfg-dir p4config))))
+ (while (not (or (string= p4-cfg-dir
+ (file-name-directory (directory-file-name
p4-cfg-dir)))
+ (file-exists-p (expand-file-name p4-cfg-dir
p4config))))
(setq p4-cfg-dir
- (substring p4-cfg-dir 0
- (string-match "[^/]*/?$" p4-cfg-dir))))
+ (file-name-directory (directory-file-name p4-cfg-dir))
+ ))
;; if we did find a p4config file, this is under P4 control
(if (not (string-match "^\\([a-zA-Z]:\\)?/$" p4-cfg-dir))
(p4-check-mode)
Cheers,
Malcolm