Subject: Re: bug#35663: 27.0.50; Eldoc support for apply

From: Michael Heerdegen <[email-masked]>
Date: Fri, 10 May 2019 13:41:25 +0200

Noam Postavsky <[email-masked]> writes:

> Hmm, maybe I mixed this is up with stepping into funcall/apply with
> edebug.

Probably.  We should also fix this.  I currently use this hack as
workaround:

(advice-add
 'edebug-instrument-callee :around
 (defun my-edebug-instrument-callee--around-ad (f)
   (condition-case nil
       (funcall f)
     (error
      (when (y-or-n-p "edebug-instrument-callee error - select a function by name?")
        (edebug-instrument-function
         (intern
          (completing-read
           "Function to instrument: " obarray #'fboundp t
           (when (looking-at "\(\\(?:funcall\\|apply\\|funcall-interactively\\) +\\(?:#?'\\)?\\(\\(?:\\sw\\|\\s_\\)+\\)[ \)]")
             (match-string 1))))))))))

I guess in unambiguous cases we can even omit prompting.

Michael.