;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:47:19 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/lpr.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`lpr.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\302B\304\302!\204 	\305>\303B\304\303!\204 	\306>\307\310\311\312\313\314%\207" [current-load-list system-type lpr-windows-system lpr-lp-system boundp (emx win32 w32 mswindows ms-dos windows-nt) (usg-unix-v dgux hpux irix) custom-declare-group lpr nil "Print Emacs buffer on line printer" :group wp] 6)
#@737 *The name of a local printer to which data is sent for printing.
(Note that PostScript files are sent to `ps-printer-name', which see.)

On Unix-like systems, a string value should be a name understood by
lpr's -P option; otherwise the value should be nil.

On MS-DOS and MS-Windows systems, a string value is taken as the name of
a printer device or port, provided `lpr-command' is set to "".
Typical non-default settings would be "LPT1" to "LPT3" for parallel
printers, or "COM1" to "COM4" or "AUX" for serial printers, or
"//hostname/printer" for a shared network printer.  You can also set
it to the name of a file, in which case the output gets appended to that
file.  If you want to discard the printed output, set this to "NUL".
(custom-declare-variable 'printer-name '(and lpr-windows-system "PRN") '(#$ . -933) :type '(choice :menu-tag "Printer Name" :tag "Printer Name" (const :tag "Default" nil) (file :tag "Name")) :group 'lpr)
#@181 *List of strings to pass as extra options for the printer program.
It is recommended to set `printer-name' instead of including an explicit
switch on this list.
See `lpr-command'.
(custom-declare-variable 'lpr-switches 'nil '(#$ . -1880) :type '(repeat (string :tag "Argument")) :group 'lpr)
#@211 *Non-nil means construct `-T' and `-J' options for the printer program.
These are made assuming that the program is `lpr';
if you are using some other incompatible printer program,
this variable should be nil.
(custom-declare-variable 'lpr-add-switches '(memq system-type '(berkeley-unix gnu/linux)) '(#$ . -2179) :type 'boolean :group 'lpr)
#@123 *Printer switch, that is, something like "-P", "-d ", "/D:", etc.
This switch is used in conjunction with `printer-name'.
(custom-declare-variable 'lpr-printer-switch '(if lpr-lp-system "-d " "-P") '(#$ . -2528) :type '(choice :menu-tag "Printer Name Switch" :tag "Printer Name Switch" (const :tag "None" nil) (string :tag "Printer Switch")) :group 'lpr)
#@471 *Name of program for printing a file.

On MS-DOS and MS-Windows systems, if the value is an empty string then
Emacs will write directly to the printer port named by `printer-name'.
The programs `print' and `nprint' (the standard print programs on
Windows NT and Novell Netware respectively) are handled specially, using
`printer-name' as the destination for output; any other program is
treated like `lpr' except that an explicit filename is given as the last
argument.
(custom-declare-variable 'lpr-command '(cond (lpr-windows-system "") (lpr-lp-system "lp") (t "lpr")) '(#$ . -2890) :type 'string :group 'lpr)
#@163 *List of strings of options to request page headings in the printer program.
If nil, we run `lpr-page-header-program' to make page headings
and print the result.
(custom-declare-variable 'lpr-headers-switches 'nil '(#$ . -3509) :type '(repeat (string :tag "Argument")) :group 'lpr)
#@112 Function to call to print the region on a printer.
See definition of `print-region-1' for calling conventions.
(custom-declare-variable 'print-region-function 'nil '(#$ . 3798) :type '(choice (const nil) function) :group 'lpr)
#@53 *Name of program for adding page headers to a file.
(custom-declare-variable 'lpr-page-header-program '"pr" '(#$ . -4031) :type 'string :group 'lpr)
#@145 *List of strings to use as options for the page-header-generating program.
The variable `lpr-page-header-program' specifies the program to use.
(custom-declare-variable 'lpr-page-header-switches ''("-F") '(#$ . -4187) :type '(repeat string) :group 'lpr)
#@152 Print buffer contents without pagination or page headers.
See the variables `lpr-switches' and `lpr-command'
for customization of the printer command.
(defalias 'lpr-buffer #[nil "\301ed\302$\207" [lpr-switches print-region-1 nil] 5 (#$ . 4448) nil])
#@521 Paginate and print buffer contents.

The variable `lpr-headers-switches' controls how to paginate.
If it is nil (the default), we run the `pr' program (or whatever program
`lpr-page-header-program' specifies) to paginate.
`lpr-page-header-switches' specifies the switches for that program.

Otherwise, the switches in `lpr-headers-switches' are used
in the print command itself; we expect them to request pagination.
 
See the variables `lpr-switches' and `lpr-command'
for further customization of the printer command.
(defalias 'print-buffer #[nil "\301ed\302$\207" [lpr-switches print-region-1 t] 5 (#$ . 4707) nil])
#@152 Print region contents without pagination or page headers.
See the variables `lpr-switches' and `lpr-command'
for customization of the printer command.
(defalias 'lpr-region #[(start end) "\303	\n\304$\207" [start end lpr-switches print-region-1 nil] 5 (#$ . 5335) "r"])
#@525 Paginate and print the region contents.

The variable `lpr-headers-switches' controls how to paginate.
If it is nil (the default), we run the `pr' program (or whatever program
`lpr-page-header-program' specifies) to paginate.
`lpr-page-header-switches' specifies the switches for that program.

Otherwise, the switches in `lpr-headers-switches' are used
in the print command itself; we expect them to request pagination.
 
See the variables `lpr-switches' and `lpr-command'
for further customization of the printer command.
(defalias 'print-region #[(start end) "\303	\n\304$\207" [start end lpr-switches print-region-1 t] 5 (#$ . 5613) "r"])
(defalias 'print-region-1 #[(start end switches page-headers) "\306 \307P\306 \307P\206 	\n\206 	\310\211 !\"\212#\203> $\203> \311$;\2037 $C\2029 $%\"%\312\313\314%\"!%\203V \315\316\317%\320#P\202W \321\322\323\f\"\210\324U\204\207 \325&'\"\211(@&(A' \212'b\210\326 ')\327ed\"\210)#\203\267 $\204\267 \325&'\"(\330\331(@(A)\332\211\310\333!D*\244&\210)e&d'\330+\206\276 \331&',\310\211\211\257-\205\322 \334\"D\244-\205\341 $\205\341 \335!D\244.;\205\356 /.PC\244\244\"\210\336'!\203 '\310\211\223\210\322\337\f\".\207" [coding-system-for-write buffer-file-coding-system coding-system-for-read tab-width switch-string nswitches buffer-name " Emacs buffer" nil append lpr-flatten-list mapcar lpr-eval-switch " with options " mapconcat identity " " "" message "Spooling%s..." 8 print-region-new-buffer point-marker untabify apply call-process-region t "-h" "-J" "-T" markerp "Spooling%s...done" width title name page-headers lpr-headers-switches switches start end new-coords lpr-page-header-program lpr-page-header-switches print-region-function lpr-command lpr-add-switches printer-name lpr-printer-switch] 11])
(defalias 'print-region-new-buffer #[(ostart oend) "\303 \304\230\203 	B\207p\305\304!q\210~\210\306 \210\307\n	#\210ed)B\207" [ostart oend oldbuf buffer-name " *spool temp*" get-buffer-create erase-buffer insert-buffer-substring] 4])
#@224 Replace nonprinting characters in region with printable representations.
The printable representations use ^ (for ASCII control characters) or hex.
The characters tab, linefeed, space, return and formfeed are not affected.
(defalias 'printify-region #[(begin end) "\212b\210\303\304\305\n\306#\205, h\307\310!\210	\311W\203# \312\313	\314\\\"\202' \312\315	\"c\210\202 *\207" [begin c end nil re-search-forward "[ ---\377]" t delete-backward-char 1 32 format "\\^%c" 64 "\\%02x"] 4 (#$ . 7682) "r"])
(defalias 'lpr-eval-switch #[(arg) ";\203 \207\301!\203  \2079\203 J\207:\203$ \302@A\"\207\303\207" [arg functionp apply nil] 3])
(defalias 'lpr-flatten-list #[(&rest list) "\301!\207" [list lpr-flatten-list-1] 2])
(defalias 'lpr-flatten-list-1 #[(list) "\204 \301\207:\203 \302\303@!\303A!\"\207C\207" [list nil append lpr-flatten-list-1] 4])
(provide 'lpr)
