Function: srecode-insert

srecode-insert is an interactive and byte-compiled function defined in insert.el.gz.

Signature

(srecode-insert TEMPLATE-NAME &rest DICT-ENTRIES)

Documentation

Insert the template TEMPLATE-NAME into the current buffer at point.

DICT-ENTRIES are additional dictionary values to add.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/srecode/insert.el.gz
;;;###autoload
(defun srecode-insert (template-name &rest dict-entries)
  "Insert the template TEMPLATE-NAME into the current buffer at point.
DICT-ENTRIES are additional dictionary values to add."
  (interactive (list (srecode-read-template-name "Template Name: ")))
  (if (not (srecode-table))
      (error "No template table found for mode %s" major-mode))
  (let ((newdict (srecode-create-dictionary))
	(temp (srecode-template-get-table (srecode-table) template-name))
	(srecode-insertion-start-context (srecode-calculate-context))
	)
    (if (not temp)
	(error "No Template named %s" template-name))
    (while dict-entries
      (srecode-dictionary-set-value newdict
				    (car dict-entries)
				    (car (cdr dict-entries)))
      (setq dict-entries (cdr (cdr dict-entries))))
    (srecode-insert-fcn temp newdict)
    ;; Don't put code here.  We need to return the end-mark
    ;; for this insertion step.
    ))