Function: nndoc-add-type

nndoc-add-type is an autoloaded and byte-compiled function defined in nndoc.el.gz.

Signature

(nndoc-add-type DEFINITION &optional POSITION)

Documentation

Add document DEFINITION to the list of nndoc document definitions.

If POSITION is nil or last, the definition will be added as the last checked definition, if t or first, add as the first definition, and if any other symbol, add after that symbol in the alist.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nndoc.el.gz
;;;###autoload
(defun nndoc-add-type (definition &optional position)
  "Add document DEFINITION to the list of nndoc document definitions.
If POSITION is nil or `last', the definition will be added
as the last checked definition, if t or `first', add as the
first definition, and if any other symbol, add after that
symbol in the alist."
  ;; First remove any old instances.
  (gnus-alist-pull (car definition) nndoc-type-alist)
  ;; Then enter the new definition in the proper place.
  (cond
   ((or (null position) (eq position 'last))
    (setq nndoc-type-alist (nconc nndoc-type-alist (list definition))))
   ((or (eq position t) (eq position 'first))
    (push definition nndoc-type-alist))
   (t
    (let ((list (memq (assq position nndoc-type-alist)
		      nndoc-type-alist)))
      (unless list
	(error "No such position: %s" position))
      (setcdr list (cons definition (cdr list)))))))