pr-mode-alist

pr-mode-alist is a variable defined in `printing.el'.
Its value is shown below.
  • This variable may be risky if used as a file-local variable.

Documentation:
Specify an alist for a major-mode and printing functions.

To customize a major mode printing, just declare the customization in
`pr-mode-alist' and invoke some of `*-mode*' commands. An example for major
mode usage is when you're using gnus (or mh, or rmail, etc.) and you're in the
*Summary* buffer, if you forget to switch to the *Article* buffer before
printing, you'll get a nicely formatted list of article subjects shows up at
the printer. With major mode printing you don't need to switch from gnus
*Summary* buffer first.

The elements have the following form:

(MAJOR-MODE
LPR-PRINT PS-PRINT
HEADER-LINES
LEFT-HEADER
RIGHT-HEADER
KILL-LOCAL-VARIABLE
DEFAULT...)

Where:

MAJOR-MODE It's the major mode symbol.

LPR-PRINT It's a symbol function for text printing. It's invoked with
one argument:
(HEADER-LINES LEFT-HEADER RIGHT-HEADER DEFAULT...).

Usually LPR-PRINT function prepares the environment or buffer
and then call the function `pr-mode-lpr' which it's used to
process the buffer and send it to text printer.

The `pr-mode-lpr' definition is:

(pr-mode-lpr HEADER-LIST &optional FROM TO)

Where HEADER-LIST is like the argument passed to LPR-PRINT.
FROM and TO are the beginning and end markers, respectively,
for a region. If FROM is nil, it's used (point-min); if TO is
nil, it's used (point-max).

PS-PRINT It's a symbol function for PostScript printing. It's invoked
with three arguments: n-up printing, file name and the list:
(HEADER-LINES LEFT-HEADER RIGHT-HEADER DEFAULT...).

Usually PS-PRINT function prepares the environment or buffer
and then call the function `pr-mode-print' which it's used to
process the buffer and send it to PostScript printer.

The `pr-mode-print' definition is:

(pr-mode-print N-UP FILENAME HEADER-LIST &optional FROM TO)

Where N-UP, FILENAME and HEADER-LIST are like the arguments
passed to PS-PRINT. FROM and TO are the beginning and end
markers, respectively, for a region. If TO is nil, it's used
(point-max).

HEADER-LINES It's the number of header lines; if is nil, it uses
`ps-header-lines' value.

LEFT-HEADER It's the left header part, it's a list of string, variable
symbol or function symbol (with no argument); if is nil, it
uses `ps-left-header' value.

RIGHT-HEADER It's the right header part, it's a list of string, variable
symbol or function symbol (with no argument); if is nil, it
uses `ps-right-header' value.

KILL-LOCAL-VARIABLE
Non-nil means to kill all buffer local variable declared in
DEFAULT (see below).

DEFAULT It's a way to set default values when this entry is selected.
It's a cons like:

(VARIABLE-SYM . VALUE)

Which associates VARIABLE-SYM with VALUE. When this entry is
selected, it's executed the following command:

(set (make-local-variable VARIABLE-SYM) (eval VALUE))

Note that VALUE can be any valid lisp expression. So, don't
forget to quote symbols and constant lists.
If VARIABLE is the special keyword `inherits-from:', VALUE must
be a symbol name setting defined in `pr-setting-database' from
which the current setting inherits the context. Take care with
circular inheritance.
Examples:
'(ps-landscape-mode . nil)
'(ps-spool-duplex . t)
'(pr-gs-device . (my-gs-device t))

You can customize this variable.

Value:

((mh-folder-mode pr-mh-lpr-1 pr-mh-print-1 2 (ps-article-author ps-article-subject) ("/pagenumberstring load" pr-article-date) nil) (mh-letter-mode pr-mh-lpr-2 pr-mh-print-2 2 (ps-article-author ps-article-subject) ("/pagenumberstring load" pr-article-date) nil) (rmail-summary-mode pr-rmail-lpr pr-rmail-print 3 (ps-article-subject ps-article-author buffer-name) nil nil) (rmail-mode pr-rmail-lpr pr-rmail-print 3 (ps-article-subject ps-article-author buffer-name) nil nil) (gnus-summary-mode pr-gnus-lpr pr-gnus-print 3 (ps-article-subject ps-article-author gnus-newsgroup-name) nil nil) (gnus-article-mode pr-gnus-lpr pr-gnus-print 3 (ps-article-subject ps-article-author gnus-newsgroup-name) nil nil) (Info-mode pr-mode-lpr pr-mode-print 2 (ps-info-node ps-info-file) nil nil) (vm-mode pr-vm-lpr pr-vm-print 3 (ps-article-subject ps-article-author buffer-name) nil nil))