[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: bug#23873: Emacs 24.0.94: With function argdesc bitstring, Elisp man
RE: bug#23873: Emacs 24.0.94: With function argdesc bitstring, Elisp manual does not say how to get arg list
Fri, 1 Jul 2016 07:01:34 -0700 (PDT)
> In a few places, Hyperbole uses its own function to overload existing
> functions with its own and needs access to the function's argument
> signature to do this. For reasons of backward compatibility,
> Hyperbole has not used defadvice. In another case, we want to know if
> a function's signature has changed for a conditional dispatch.
Not a general solution, but this approach often works if the
(condition-case nil ; Emacs 22+ accepts a default.
(read-face-name "Face: " default-face)
(wrong-number-of-arguments (read-face-name "Face: ")))
(funcall cmd arg) ; Try to use string candidate `arg'.
;; If that didn't work, use a symbol or number candidate.
(wrong-type-argument (funcall cmd (car (read-from-string arg))))
(wrong-number-of-arguments (funcall #'icicle-help-on-candidate))) ; Punt