+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\"."
+ :type '(choice :menu-tag "Printer Name"
+ :tag "Printer Name"
+ (const :tag "Default" nil)
+ ;; could use string but then we lose completion for files.
+ (file :tag "Name"))
+ :group 'lpr)
+
+;;;###autoload
+(defcustom lpr-switches nil
+ "*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'."
+ :type '(repeat (string :tag "Argument"))
+ :group 'lpr)
+
+(defcustom lpr-add-switches (memq system-type '(berkeley-unix gnu/linux))
+ "*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."
+ :type 'boolean
+ :group 'lpr)
+
+(defcustom lpr-printer-switch
+ (if lpr-lp-system
+ "-d "
+ "-P")
+ "*Printer switch, that is, something like \"-P\", \"-d \", \"/D:\", etc.
+This switch is used in conjunction with `printer-name'."
+ :type '(choice :menu-tag "Printer Name Switch"
+ :tag "Printer Name Switch"
+ (const :tag "None" nil)
+ (string :tag "Printer Switch"))
+ :group 'lpr)
+
+;;;###autoload
+(defcustom lpr-command
+ (cond
+ (lpr-windows-system
+ "")
+ (lpr-lp-system
+ "lp")
+ (t
+ "lpr"))
+ "*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."
+ :type 'string
+ :group 'lpr)
+
+;; Default is nil, because that enables us to use pr -f
+;; which is more reliable than pr with no args, which is what lpr -p does.
+(defcustom lpr-headers-switches nil
+ "*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."
+ :type '(repeat (string :tag "Argument"))
+ :group 'lpr)
+
+(defcustom print-region-function nil