Stefan Monnier writes: >> It is, yes. The code is clear, not transcendental at all. But writing >> docstrings is hard. In fact, it's possibly the hardest part of the >> game. Tell you what: you write the docstring for >> eldoc-documentation-functions, I'll do the implementation. >> >> Deal? > > Deal, at the condition that the code comes before I write the docstrings ;-) Okay. 2 patches attached (my version + your futures). Just search for 'WORLD CLASS DOCSTRING' and fill in your part. For my part, really feels like I've reimplemented funcall. Anyway both approaches lightly tested on this foo.el file: ;;; foo.el --- foobarbaz -*- lexical-binding:t; -*- (setq-local eldoc-documentation-function #'eldoc-documentation-compose) ;; Callback approach ;; (setq-local eldoc-documentation-functions nil) (defun eldoc-cback-0 (cback &rest _) (run-with-timer 0.22 nil (lambda () (funcall cback (symbol-name (gensym "cback-0-")))))) (defun eldoc-cback-1 (&rest _) (symbol-name (gensym "cback-1-"))) (defun eldoc-cback-2 (cback &rest _) (run-with-timer 2.22 nil (lambda () (funcall cback (symbol-name (gensym "cback-2-")))))) (add-hook 'eldoc-documentation-functions #'eldoc-cback-0 00 t) (add-hook 'eldoc-documentation-functions #'eldoc-cback-1 10 t) (add-hook 'eldoc-documentation-functions #'eldoc-cback-2 20 t) ;; Very futuristic approach ;; (setq-local eldoc-documentation-functions nil) (defun eldoc-future-0 () (let ((f (eldoc-future-make))) (run-with-timer 0.22 nil (lambda () (eldoc-future-set f (symbol-name (gensym "future-0-"))))) f)) (defun eldoc-future-1 () (symbol-name (gensym "future-1-"))) (defun eldoc-future-2 () (let ((f (eldoc-future-make))) (run-with-timer 2.22 nil (lambda () (eldoc-future-set f (symbol-name (gensym "future-2-"))))) f)) (add-hook 'eldoc-documentation-functions #'eldoc-future-0 00 t) (add-hook 'eldoc-documentation-functions #'eldoc-future-1 10 t) (add-hook 'eldoc-documentation-functions #'eldoc-future-2 20 t) > [ I like this deal: it's always better for someone else to write the > docstrings, so at least 2 persons need to agree on what they think the > code does (assuming the author of the code checks the resulting docstrings). ] Yes, it's called cascade dev, and it gets a bad rep nowadays. Tho the person who writes the docstrings usually goes first ;-) João