unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Providing additional information with C-h f
@ 2024-12-10 22:59 Heime via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; only message in thread
From: Heime via Users list for the GNU Emacs text editor @ 2024-12-10 22:59 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor



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))



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-10 22:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 22:59 Providing additional information with C-h f Heime via Users list for the GNU Emacs text editor

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).