Function: forms--parse-form

forms--parse-form is a byte-compiled function defined in forms.el.gz.

Signature

(forms--parse-form)

Documentation

Parse contents of form into list of strings.

Source Code

;; Defined in /usr/src/emacs/lisp/forms.el.gz
(defun forms--parse-form ()
  "Parse contents of form into list of strings."
  ;; The contents of the form are parsed, and a new list of strings
  ;; is constructed.
  ;; A vector with the strings from the original record is
  ;; constructed, which is updated with the new contents.  Therefore
  ;; fields which were not in the form are not modified.
  ;; Finally, the vector is transformed into a list for further processing.

  (let (forms--recordv)

    ;; Build the vector.
    (setq forms--recordv (vconcat forms--the-record-list))

    ;; Parse the form and update the vector.
    (let ((forms--dynamic-text forms--dynamic-text))
      (funcall forms--parser))

    (if forms-modified-record-filter
	;; As a service to the user, we add a zeroth element so she
	;; can use the same indices as in the forms definition.
	(let ((the-fields (vconcat [nil] forms--recordv)))
	  (setq the-fields (funcall forms-modified-record-filter the-fields))
	  (cdr (append the-fields nil)))

      ;; Transform to a list and return.
      (append forms--recordv nil))))