all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* User specified instructions for appending additional details to function documentation
@ 2024-12-10 19:07 Heime via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; only message in thread
From: Heime via Users list for the GNU Emacs text editor @ 2024-12-10 19:07 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor


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."))






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-10 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 19:07 User specified instructions for appending additional details to function documentation Heime via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.