Subject: Re: bug#17564: 24.4.50; REGRESSION: (wrong-type-argument arrayp C-source)
From: Stefan Monnier <[email-masked]>
To: Drew Adams <[email-masked]>
Cc: [email-masked]
Date: Tue, 24 Jun 2014 20:49:24 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

> The code of `describe-function-1' seems to have changed to cause this
> regression.  In this sexp of `describe-function-1':

> (and (or (byte-code-function-p def)
>          (keymapp def)
>          (memq (car-safe def) '(macro lambda closure)))
>      file-name
>      (help-fns--autoloaded-p function file-name))

> if the FUNCTION has been redefined, as below, each of the `and' clauses
> returns non-nil leading up to `help-fns--autoloaded-p', and that
> function fails because it is given `C-source' as its FILE-NAME arg.

I installed a trivial patch to avoid this problem.

> (or (fboundp '1on1-ORIG-top-level)
>     (fset '1on1-ORIG-top-level (symbol-function 'top-level)))
>
> (defun top-level ()
>   "Exit all recursive editing levels."
>   (interactive)
>   ;; (1on1-color-minibuffer-frame-on-exit)
>   (1on1-ORIG-top-level))

Of course, using an advice here would be preferable.

        Stefan