help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding documentation construct to display text in a defvar or defconst w


From: Heime
Subject: Adding documentation construct to display text in a defvar or defconst without the header
Date: Wed, 11 Dec 2024 11:57:10 +0000



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 via email to

[Prev in Thread] Current Thread [Next in Thread]