Function: ebnf-eps-production-list

ebnf-eps-production-list is a byte-compiled function defined in ebnf2ps.el.gz.

Signature

(ebnf-eps-production-list PROD-LIST FILE-LIST-REF HORIZONTAL PROD-WIDTH PROD-HEIGHT EPS-BUFFER)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ebnf2ps.el.gz
;; insert EPS buffer in all buffer associated with production
(defun ebnf-eps-production-list (prod-list file-list-ref horizontal
					   prod-width prod-height eps-buffer)
  (while prod-list
    (cl-pushnew (car prod-list) (gv-deref file-list-ref) :test #'equal)
    (with-current-buffer (get-buffer-create (concat " *" (car prod-list) "*"))
      (goto-char (point-max))
      (cond
       ;; first production
       ((zerop (buffer-size))
	(setq ebnf-eps-upper-x    0.0
	      ebnf-eps-upper-y    0.0
	      ebnf-eps-max-width  prod-width
	      ebnf-eps-max-height prod-height))
       ;; horizontal
       (horizontal
	(ebnf-eop-horizontal ebnf-eps-prod-width)
	(setq ebnf-eps-max-width  (+ ebnf-eps-max-width
				     ebnf-production-horizontal-space
				     prod-width)
	      ebnf-eps-max-height (max ebnf-eps-max-height prod-height)))
       ;; vertical
       (t
	(ebnf-eop-vertical ebnf-eps-max-height)
	(setq ebnf-eps-upper-x    (max ebnf-eps-upper-x ebnf-eps-max-width)
	      ebnf-eps-upper-y    (if (zerop ebnf-eps-upper-y)
				      ebnf-eps-max-height
				    (+ ebnf-eps-upper-y
				       ebnf-production-vertical-space
				       ebnf-eps-max-height))
	      ebnf-eps-max-width  prod-width
	      ebnf-eps-max-height prod-height))
       )
      (setq ebnf-eps-prod-width prod-width)
      (insert-buffer-substring eps-buffer))
    (setq prod-list (cdr prod-list))))