>>>>> "Gunnar" == Gunnar Evermann <ge204(a)eng.cam.ac.uk> writes:
Gunnar> karlheg(a)bittersweet.inetarena.com (Karl M. Hegbloom) writes:
>> With or without `-vanilla', if I go straight to the directory where
>> the man pages are and use `dired-man-locally', it will crash. But if
>> I view a man page first, with `M-x man', or just `M-x load-library
>> man', then go there and use `l', it works fine.
>> (defun dired-man-locally ()
>> (interactive)
>> (if (= 1 (function-max-args #'manual-entry))
>> (manual-entry (concat (dired-get-filename) " -l"))
>> (manual-entry (dired-get-filename) "-l")))
Gunnar> One can trigger this crash by evaluating:
Gunnar> (function-max-args #'manual-entry)
I get following *Backtrace* when evaluating these in order
(setq debug-on-error t)
(function-max-args #'manual-entry)
in (emacs-version)
"XEmacs 21.1 (patch 12) \"Channel Islands\" [Lucid] (i386-pc-win32) of
Sun Aug 06 2000 on ZJ75T"
started -vanilla:
Signaling: (invalid-function (nil ("c:\\XEmacs\\xemacs-packages\\lisp\\edit-utils\\man.elc" . 1617)))
function-max-args(manual-entry)
eval((function-max-args (function manual-entry)))
eval-interactive((function-max-args (function manual-entry)))
eval-last-sexp(nil)
call-interactively(eval-last-sexp)
Best regards,
Adrian
Gunnar> in a vanilla xemacs with any function that is autoloaded.
Gunnar> function-max-args performs the autoloading but doesn't actually use
Gunnar> the function just loaded, instead it infloops on the autoload
Gunnar> definition.
Gunnar> This should fix it (21.2 only -- I'll send a 21.1 patch in a separate
Gunnar> mail.)
Gunnar> 2000-08-06 Gunnar Evermann <ge204(a)eng.cam.ac.uk>
Gunnar> * eval.c (function_argcount): If function needs to be autoloaded
Gunnar> actually use the loaded definition.
Gunnar> --- src/eval.c~ Sun Aug 6 12:32:39 2000
Gunnar> +++ src/eval.c Sun Aug 6 20:58:36 2000
Gunnar> @@ -3651,6 +3651,7 @@
Gunnar> else if (EQ (funcar, Qautoload))
Gunnar> {
Gunnar> do_autoload (function, orig_function);
Gunnar> + function = orig_function;
Gunnar> goto retry;
Gunnar> }
Gunnar> else if (EQ (funcar, Qlambda))