Function: shortdoc-add-function

shortdoc-add-function is a byte-compiled function defined in shortdoc.el.gz.

Signature

(shortdoc-add-function GROUP SECTION ELEM)

Documentation

Add ELEM to shortdoc GROUP in SECTION.

If GROUP doesn't exist, it will be created. If SECTION doesn't exist, it will be added.

ELEM is a Lisp form. See define-short-documentation-group for details.

Example:

  (shortdoc-add-function
    'file "Predicates"
    '(file-locked-p :no-eval (file-locked-p "/tmp")))

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/shortdoc.el.gz
(defun shortdoc-add-function (group section elem)
  "Add ELEM to shortdoc GROUP in SECTION.
If GROUP doesn't exist, it will be created.
If SECTION doesn't exist, it will be added.

ELEM is a Lisp form.  See `define-short-documentation-group' for
details.

Example:

  (shortdoc-add-function
    \\='file \"Predicates\"
    \\='(file-locked-p :no-eval (file-locked-p \"/tmp\")))"
  (let ((glist (assq group shortdoc--groups)))
    (unless glist
      (setq glist (list group))
      (push glist shortdoc--groups))
    (let ((slist (member section glist)))
      (unless slist
        (setq slist (list section))
        (nconc glist slist))
      (while (and (cdr slist)
                  (not (stringp (cadr slist))))
        (setq slist (cdr slist)))
      (setcdr slist (cons elem (cdr slist))))))