all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jens Petersen <petersen@redhat.com>
Cc: emacs-devel@gnu.org
Subject: file-chase-links limit
Date: 09 Apr 2003 16:33:02 +0900	[thread overview]
Message-ID: <m3ptnwyvkh.fsf@smile.house> (raw)

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)

             reply	other threads:[~2003-04-09  7:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-09  7:33 Jens Petersen [this message]
2003-04-10  6:22 ` file-chase-links limit Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ptnwyvkh.fsf@smile.house \
    --to=petersen@redhat.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.