unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Using describe-variable
Date: Sat, 13 Apr 2024 20:30:19 +0000	[thread overview]
Message-ID: <uvtKBgOsgwV_SGsVAk5QDeFGvUEjhYBXss011uXU01tH8zo37fY4sQSCDiqkSCEkDtP7z0mf7jm9KZQCLinfVfHfEh5c11IepEuIWjYVVo8=@protonmail.com> (raw)

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.






             reply	other threads:[~2024-04-13 20:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-13 20:30 Heime [this message]
2024-04-14  2:40 ` Using describe-variable Stefan Monnier via Users list for the GNU Emacs text editor

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='uvtKBgOsgwV_SGsVAk5QDeFGvUEjhYBXss011uXU01tH8zo37fY4sQSCDiqkSCEkDtP7z0mf7jm9KZQCLinfVfHfEh5c11IepEuIWjYVVo8=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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).