Function: ps-generate-header-line

ps-generate-header-line is a byte-compiled function defined in ps-print.el.gz.

Signature

(ps-generate-header-line FONTTAG &optional CONTENT)

Source Code

;; Defined in /usr/src/emacs/lisp/ps-print.el.gz
(defun ps-generate-header-line (fonttag &optional content)
  (ps-output " [" fonttag " ")
  (cond
   ;; Literal strings should be output as is -- the string must contain its own
   ;; PS string delimiters, '(' and ')', if necessary.
   ((stringp content)
    (if (functionp ps-encode-header-string-function)
        (dolist (elem (funcall ps-encode-header-string-function
                               content fonttag))
	  (ps-output elem))
      (ps-output content)))

   ;; Functions are called -- they should return strings; they will be inserted
   ;; as strings and the PS string delimiters added.
   ((functionp content)
    (if (functionp ps-encode-header-string-function)
	(dolist (l (funcall ps-encode-header-string-function
			    (funcall content) fonttag))
	  (ps-output-string l))
      (ps-output-string (funcall content))))

   ;; Variables will have their contents inserted.  They should contain
   ;; strings, and will be inserted as strings.
   ((and (symbolp content) (boundp content))
    (if (fboundp ps-encode-header-string-function)
	(dolist (l (funcall ps-encode-header-string-function
                            (symbol-value content) fonttag))
	  (ps-output-string l))
      (ps-output-string (symbol-value content))))

   ;; Anything else will get turned into an empty string.
   (t
    (ps-output-string "")))
  (ps-output "]\n"))