On Wed, 2002-07-17 at 18:59, Malcolm Box 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))))
Shouldn't that be (expand-file-name p4config p4-cfg-dir) ?
(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)
Malcolm, could you also provide a ChangeLog entry and send it along with
the patch to <xemacs-patches(a)xemacs.org>?
BTW; I checked the beta version of p4.el at
<
http://www.dsmit.com/p4/p4.el-9.0>, and it looks like it's been fixed
there too, in a slightly different manner due to some new features.
TIA,
--
\/ille Skyttä