branch: externals/marginalia commit 8ad6b5aa44390bdadaefe8f0b11092b4c3651a8e Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
marginalia--function-args: Shorter text for autoloads --- marginalia.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/marginalia.el b/marginalia.el index 25160ca..5542ff8 100644 --- a/marginalia.el +++ b/marginalia.el @@ -509,7 +509,14 @@ t cl-type" (ignore-errors (documentation sym t)) sym)) (substitute-command-keys (car tmp))) - (t (help-function-arglist sym)))))) + ((setq tmp (help-function-arglist sym)) + (and + (if (and (stringp tmp) + (string-match-p "Arg list not available" tmp)) + ;; A shorter text fits better into the + ;; limited Marginalia space. + "[autoload]" + tmp))))))) (defun marginalia-annotate-symbol (cand) "Annotate symbol CAND with its documentation string."