From: Heime via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Providing additional information with C-h f
Date: Tue, 10 Dec 2024 22:59:54 +0000 [thread overview]
Message-ID: <JCTO9TRBM575YMG7ZgFXoOcvPGfb5h9zK348y6mjO9XLqd7cZkAGNTGyatQHqS2av44PfdMXHBDhbsA78UOy7iTOWGtIMYaZF3U07SqYuZI=@protonmail.com> (raw)
Have changed the value of companiol-navaid-level to 3, hoping that the documentation
of the function companiol-launch will update. But it does not.
The documentation is evaluated once when the function is defined, and not dynamically
when companiol-navaid-level changes. Is there some other way to do this? To provide
more information about a function according to the desire of the user?
Perhaps one can include a link in the documentation string to show more information about
the function, or something similar.
(defun companiol-update-doc ()
"Update the documentation string of `companiol-launch` dynamically."
(let ( (doc (concat
"Launch company-mode globally."
(when (>= companiol-navaid-level 1)
(concat "\n\n" companiol-dlvsec))
(when (>= companiol-navaid-level 2)
(concat "\n\n" companiol-dlvtri))
(when (>= companiol-navaid-level 3)
(concat "\n\n" companiol-dlvqtr)))) )
(put 'paharganj-company-launch 'function-documentation doc)))
(defun companiol-launch (actm-seqr)
"Launch company-mode globally."
(companiol-update-doc))
reply other threads:[~2024-12-10 22:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='JCTO9TRBM575YMG7ZgFXoOcvPGfb5h9zK348y6mjO9XLqd7cZkAGNTGyatQHqS2av44PfdMXHBDhbsA78UOy7iTOWGtIMYaZF3U07SqYuZI=@protonmail.com' \
--to=help-gnu-emacs@gnu.org \
--cc=heimeborgia@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).