unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
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: User specified instructions for appending additional details to function documentation
Date: Tue, 10 Dec 2024 19:07:05 +0000	[thread overview]
Message-ID: <5OFa657U-oSOGqdhsDX-6xviE9mBoebeh7GTa-puCOXY8_3B88ft1DiFkjt3TDUnZMVNFZ6YFXdoH_u_n9rzk7pSpiCiZBfO0eu_FbCSTlU=@protonmail.com> (raw)


I have the function company-launch to which I add the documentation via
keyword :documentation, appending the value of company-launch-qtr-doc.

I want to have a user defined switch for the user to decide whether he wants 
the further details provided by company-launch-qtr-doc or not.

What can be done about this?


(defvar company-launch-qtr-doc
  "Usage:

  This function is designed to accept its argument, ACTM-SEQR,
either as a single symbol or as a list of symbols.

   (company-launch 'go)
   (company-launch '(go))
   (company-launch '(nogo go))

But it explicitly avoids supporting multiple symbols passed in a
flat series.

For instance, the following would not work:

   (company-launch 'nogo 'go)

If multiple symbols are passed, they are interpreted as separate
arguments, which violates the function's signature (ACTM-SEQR)
and results in an error."

  "Usage of `company-launch'.")



(defun company-launch (actm-seqr)

  ;; =============================================================

  (:documentation
     (concat

       "Launch company-mode globally.

ACTM-SEQR  Action message sequencer.

 CASE 'go    Enable `company-mode' globally by calling
             `global-company-mode'.

      'nogo  Do not enable `company-mode'."

       company-launch-qtr-doc))

  ;; =============================================================

  (add-hook 'after-init-hook 'global-company-mode)
  (message "Something something."))






                 reply	other threads:[~2024-12-10 19:07 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='5OFa657U-oSOGqdhsDX-6xviE9mBoebeh7GTa-puCOXY8_3B88ft1DiFkjt3TDUnZMVNFZ6YFXdoH_u_n9rzk7pSpiCiZBfO0eu_FbCSTlU=@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).