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: Adding documentation construct to display text in a defvar or defconst without the header
Date: Wed, 11 Dec 2024 11:57:10 +0000 [thread overview]
Message-ID: <ek2kGxRe7U-yF6LNmWJ5z2rHQrLXbK-pGJP1DjsMEPR0MUjE0tkV98NhgEYB6oL6vmCa7ilRNa5vdkGRVIj63kzW1EGiwX1EFKXCZN6NVqY=@protonmail.com> (raw)
Currently I cannot allow users to dynamically change the documentation
with different levels of detail.
For instance the following will not update the documentation string
when navaid-level is changed. companiol-dlv* being strings.
(defun companiol-launch ()
(:documentation
(concat "Something"
(when (>= navaid-level 1) (concat "\n\n" companiol-dlvsec))
(when (>= navaid-level 2) (concat "\n\n" companiol-dlvtri))
(when (>= navaid-level 3) (concat "\n\n" companiol-dlvqtr))))
But I could do the following
(defun companiol-launch ()
"Something
Additional information
`companiol-dlvsec' Usage informantion
`companiol-dlvtri' How to install company library
`companiol-dlvqtr' Implementation details"
Thus, when the user clicks upon companiol-dlvsec ho gets the information
stored in a defconst about usage informantion. And so on.
The problem that is encountered is that one also gets the additional text
--------------------------------------------------------------------------
companiol-dlvsec is a variable defined in ‘componiol.el’.
Its value is shown below.
Description of call sequence of ‘companiol-launch’.
Value:
---------------------------------------------------------------------------
To allow me to display the additional information, I do not want the additional
text to be displayed, but display just the string. Perhaps a new construct could
be allowed in the docstring so that the variable displayed for a string does not
display the additional text, but consider the string as additional documentation
detail.
reply other threads:[~2024-12-11 11:57 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='ek2kGxRe7U-yF6LNmWJ5z2rHQrLXbK-pGJP1DjsMEPR0MUjE0tkV98NhgEYB6oL6vmCa7ilRNa5vdkGRVIj63kzW1EGiwX1EFKXCZN6NVqY=@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).