Variable: pr-mode-alist

pr-mode-alist is a customizable variable defined in printing.el.gz.

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))

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))

Source Code

;; Defined in /usr/src/emacs/lisp/printing.el.gz
(defcustom pr-mode-alist
  '((mh-folder-mode			; mh summary buffer
     pr-mh-lpr-1  pr-mh-print-1
     2
     (ps-article-author ps-article-subject)
     ("/pagenumberstring load" pr-article-date)
     nil
     )
    (mh-letter-mode			; mh letter buffer
     pr-mh-lpr-2  pr-mh-print-2
     2
     (ps-article-author ps-article-subject)
     ("/pagenumberstring load" pr-article-date)
     nil
     )
    (rmail-summary-mode			; rmail summary buffer
     pr-rmail-lpr pr-rmail-print
     3
     (ps-article-subject ps-article-author buffer-name)
     nil
     nil
     )
    (rmail-mode				; rmail buffer
     pr-rmail-lpr pr-rmail-print
     3
     (ps-article-subject ps-article-author buffer-name)
     nil
     nil
     )
    (gnus-summary-mode			; gnus summary buffer
     pr-gnus-lpr  pr-gnus-print
     3
     (ps-article-subject ps-article-author gnus-newsgroup-name)
     nil
     nil
     )
    (gnus-article-mode			; gnus article buffer
     pr-gnus-lpr  pr-gnus-print
     3
     (ps-article-subject ps-article-author gnus-newsgroup-name)
     nil
     nil
     )
    (Info-mode				; Info buffer
     pr-mode-lpr  pr-mode-print
     2
     (ps-info-node ps-info-file)
     nil
     nil
     )
    (vm-mode				; vm mode
     pr-vm-lpr  pr-vm-print
     3
     (ps-article-subject ps-article-author buffer-name)
     nil
     nil
     )
    )
  "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))"
  :type '(repeat
	  (list
	   :tag ""
	   (symbol :tag "Major Mode")
	   (function :tag "Text Printing Function")
	   (function :tag "PS Printing Function")
	   (choice :menu-tag "Number of Header Lines"
		   :tag "Number of Header Lines"
		   (integer :tag "Number")
		   (const :tag "Default Number" nil))
	   (repeat :tag "Left Header List"
		   (choice :menu-tag "Left Header"
			   :tag "Left Header"
			   string symbol))
	   (repeat :tag "Right Header List"
		   (choice :menu-tag "Right Header"
			   :tag "Right Header"
			   string symbol))
	   (boolean :tag "Kill Local Variable At End")
	   (repeat
	    :tag "Default Value List"
	    :inline t
	    (cons
	     :tag ""
	     (choice
	      :menu-tag "Variable"
	      :tag "Variable"
	      (const :tag "Landscape"              ps-landscape-mode)
	      (const :tag "Print Header"           ps-print-header)
	      (const :tag "Print Header Frame"     ps-print-header-frame)
	      (const :tag "Line Number"            ps-line-number)
	      (const :tag "Zebra Stripes"          ps-zebra-stripes)
	      (const :tag "Duplex"                 ps-spool-duplex)
	      (const :tag "Tumble"                 ps-spool-tumble)
	      (const :tag "Upside-Down"            ps-print-upside-down)
	      (const :tag "PS File Landscape"      pr-file-landscape)
	      (const :tag "PS File Duplex"         pr-file-duplex)
	      (const :tag "PS File Tumble"         pr-file-tumble)
	      (const :tag "Auto Region"            pr-auto-region)
	      (const :tag "Auto Mode"              pr-auto-mode)
	      (const :tag "Ghostscript Device"     pr-gs-device)
	      (const :tag "Ghostscript Resolution" pr-gs-resolution)
	      (const :tag "inherits-from:"         inherits-from:)
	      (variable :tag "Other"))
	     (sexp :tag "Value")))
	   )))