Function: ebnf-print-buffer
ebnf-print-buffer is an autoloaded, interactive and byte-compiled
function defined in ebnf2ps.el.gz.
Signature
(ebnf-print-buffer &optional FILENAME)
Documentation
Generate and print a PostScript syntactic chart image of the buffer.
When called with a numeric prefix argument (C-u (universal-argument)), prompts the user for
the name of a file to save the PostScript image in, instead of sending
it to the printer.
More specifically, the FILENAME argument is treated as follows: if it is nil, send the image to the printer. If FILENAME is a string, save the PostScript image in a file with that name. If FILENAME is a number, prompt the user for the name of the file to save in.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/ebnf2ps.el.gz
;;;###autoload
(defun ebnf-print-buffer (&optional filename)
"Generate and print a PostScript syntactic chart image of the buffer.
When called with a numeric prefix argument (\\[universal-argument]), prompts the user for
the name of a file to save the PostScript image in, instead of sending
it to the printer.
More specifically, the FILENAME argument is treated as follows: if it
is nil, send the image to the printer. If FILENAME is a string, save
the PostScript image in a file with that name. If FILENAME is a
number, prompt the user for the name of the file to save in."
(interactive (list (ps-print-preprint current-prefix-arg)))
(ebnf-log-header "(ebnf-print-buffer %S)" filename)
(cl-letf (((symbol-function 'ps-output-string)
;; Make non-ASCII work (sort of).
(lambda (string)
(ps-output t (and string
(encode-coding-string string 'iso-8859-1))))))
(ebnf-print-region (point-min) (point-max) filename)))