unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Using describe-variable
@ 2024-04-13 20:30 Heime
  2024-04-14  2:40 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 2+ messages in thread
From: Heime @ 2024-04-13 20:30 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I want to add some additional documentation for users of a minor-mode.  Started 
with using a "defconst", and call "describe-variable".  I can either put the 
information in the variable itself, or in its documentation.  

(defconst gali-minicompl
  "Minibuffer completion is a powerful instrument that reduces typing
and saves time by efficiently completing commands, file paths, function
names, variables, and more."

"Describe Minibuffer Completion."
)

(defun gali-navi-minicompl ()
  "Provide information about using Minibuffer Completion."
  (interactive)
  (describe-variable 'gali-minicompl))

Another thing to mention is that "describe-variable" displays the variable
documentation first, followed by its value. 

At times it can be convenient to have the value printed first, followed by 
its documentation string.  And to refrain from printing either the value or
its description.






^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Using describe-variable
  2024-04-13 20:30 Using describe-variable Heime
@ 2024-04-14  2:40 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-04-14  2:40 UTC (permalink / raw)
  To: help-gnu-emacs

> I want to add some additional documentation for users of a minor-mode.

Put it in the docstring of the mode.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-14  2:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-13 20:30 Using describe-variable Heime
2024-04-14  2:40 ` Stefan Monnier 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).