Function: idlwave-doc-header

idlwave-doc-header is an interactive and byte-compiled function defined in idlwave.el.gz.

Signature

(idlwave-doc-header &optional NOMARK)

Documentation

Insert a documentation header at the beginning of the unit.

Inserts the value of the variable idlwave-file-header. Sets mark before moving to do insertion unless the optional prefix argument NOMARK is non-nil.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/idlwave.el.gz
(defun idlwave-doc-header (&optional nomark)
  "Insert a documentation header at the beginning of the unit.
Inserts the value of the variable `idlwave-file-header'.  Sets mark
before moving to do insertion unless the optional prefix argument
NOMARK is non-nil."
  (interactive "P")
  (or nomark (push-mark))
  ;; make sure we catch the current line if it begins the unit
  (if idlwave-header-to-beginning-of-file
      (goto-char (point-min))
    (end-of-line)
    (idlwave-beginning-of-subprogram)
    (beginning-of-line)
    ;; skip function or procedure line
    (if (idlwave-look-at "\\<\\(pro\\|function\\)\\>")
	(progn
	  (idlwave-end-of-statement)
	  (if (> (forward-line 1) 0) (insert "\n")))))
  (let ((pos (point)))
    (if idlwave-file-header
	(cond ((car idlwave-file-header)
	       (insert-file-contents (car idlwave-file-header)))
	      ((stringp (car (cdr idlwave-file-header)))
	       (insert (car (cdr idlwave-file-header))))))
    (goto-char pos)))