problems with lemacs 19.10

sandy@ibm550.sissa.it
Wed, 15 Jun 1994 19:57:47 +0200


There have been some infinite recursion problems reported with lemacs
19.10 and efs.  I have a suspicion that I know what is wrong here.

Starting with 19.23, FSF Emacs added a second argument OPERATION to
find-file-name-handler.  This argument was added to avoid an infinite
recursion problem with the file-name-handler-alist scheme. These
problems were discovered during alpha testing of efs 1.7, which is why
1.7 was never released.  In FSF Emacs this argument was made
mandatory, so anything calling find-file-name-handler without giving
it would bomb.  In Lucid Emacs it was made optional, for some reason.
This probably means that in the Lucid distribution there are still
some calls to find-file-name-handler that do not supply the second
argument.  If this is so, that's where the infinite recursions are
coming from.  This is a lemacs bug.  _All_ calls to
find-file-name-handler, both in C and lisp must supply the second arg.

As well, I just got a copy of the following from vc-hooks.el:

(defun vc-registered (file)
  (let (handler handlers)
    (if (boundp 'file-name-handler-alist)
	(save-match-data
	  (setq handlers file-name-handler-alist)
	  (while (and (consp handlers) (null handler))
	    (if (and (consp (car handlers))
		     (stringp (car (car handlers)))
		     (string-match (car (car handlers)) file))
		(setq handler (cdr (car handlers))))
	    (setq handlers (cdr handlers)))))
    (if handler
	(funcall handler 'vc-registered file)
      ;; Search for a master corresponding to the given file
...

This is buggy.  Rather than using find-file-name-handler, this
attempts to find a handler by hand.  find-file-name-handler knows
about inhibit-file-name-handlers and inhibit-file-name-operation, and
uses them to avoid infinite recursions.  The above code will recurse
with efs.

I will see if I can write some sort of patchup file to solve the
problem with lemacs 19.10.  It will probably be something like the
19.22 backwards compatibility file that I just threw together.

In the meantime, lemacs people might want to track down bad calls to
find-file-name-handler.  Scan for "find-file-name-handler" and
"file-name-handler-alist".

--sandy