After my initial config, ido-read-internal becomes advised by flx:

(ido-mode)
(require 'flx-ido)
(setq ido-enable-flex-matching t)

So now I get this:

(help-function-arglist 'ido-read-internal t)
;; => (&rest rest)

instead of this:

(help-function-arglist 'ido-read-internal t)
;; => (item prompt hist &optional default require-match initial)

I've found a small work around for this:

(ad-deactivate 'ido-read-internal)
(help-function-arglist 'ido-read-internal t)
(ad-activate 'ido-read-internal)

Is there a better way to do this? Are there any side-effects of calling ad-deactivate and ad-activate?

  • I think this can be considered a bug, so please M-x report-emacs-bug. – Stefan Dec 28 '14 at 20:10
  • @Stefan, bug report sent. – abo-abo Dec 28 '14 at 20:29
up vote 6 down vote accepted

You can use ad-get-orig-definition to get the original definition and then use help-function-arglist as usual to get the argument list, for example

(help-function-arglist (ad-get-orig-definition 'ido-read-internal))

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.