all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* file-chase-links limit
@ 2003-04-09  7:33 Jens Petersen
  2003-04-10  6:22 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Jens Petersen @ 2003-04-09  7:33 UTC (permalink / raw)
  Cc: emacs-devel

I just tried to build cvs head and ran into problems with
byte-compiling "eshell/esh-module.el".  Investigating
further I found the problem seems to be caused by the
evaluation of `(max nil 100)' in `file-chase-links' and I
noticed the following recent change:

- - -
revision 1.648
date: 2003/04/09 01:34:38;  author: rms;  state: Exp;  lines: +11 -6
(file-chase-links): New arg LIMIT.
After that many iterations, just return what we've got.
- - -

I'm not sure what the intended behaviour was when LIMIT is
nil, but I guess something like the following change is
needed - at least with this the tree seems to build ok for me.
(The latter change should take care of the case when LIMIT
is not an integer.)

Jens


Index: files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.648
diff -u -r1.648 files.el
--- files.el	9 Apr 2003 01:34:38 -0000	1.648
+++ files.el	9 Apr 2003 07:29:34 -0000
@@ -746,11 +746,11 @@
 it means chase no more than that many links and then stop."
   (let (tem (newname filename)
 	    (count 0)
-	    (max (max limit 100)))
+	    (max (if limit (max limit 100) 100)))
     (while (and (or (null limit) (< count limit))
 		(setq tem (file-symlink-p newname)))
       (save-match-data
-	(if (= count max)
+	(if (>= count max)
 	    (error "Apparent cycle of symbolic links for %s" filename))
 	;; In the context of a link, `//' doesn't mean what Emacs thinks.
 	(while (string-match "//+" tem)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: file-chase-links limit
  2003-04-09  7:33 file-chase-links limit Jens Petersen
@ 2003-04-10  6:22 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2003-04-10  6:22 UTC (permalink / raw)
  Cc: emacs-devel

I think I have fixed file-chase-links.  Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-10  6:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-09  7:33 file-chase-links limit Jens Petersen
2003-04-10  6:22 ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.