Some fixes to follow coding conventions in files maintained by FSF.
[bpt/emacs.git] / lisp / lpr.el
index 41e3f03..213a6d0 100644 (file)
@@ -1,9 +1,9 @@
-;;; lpr.el --- print Emacs buffer on line printer.
+;;; lpr.el --- print Emacs buffer on line printer
 
 ;; Copyright (C) 1985, 1988, 1992, 1994, 2001 Free Software Foundation, Inc.
 
-;; Maintainer: FSF
-;; Keywords:   unix
+;; Maintainer: FSF
+;; Keywords: unix
 
 ;; This file is part of GNU Emacs.
 
@@ -76,8 +76,8 @@ See `lpr-command'."
   :type '(repeat (string :tag "Argument"))
   :group 'lpr)
 
-(defcustom lpr-add-switches (eq system-type 'berkeley-unix)
-  "*Non-nil means construct -T and -J options for the printer program.
+(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."
@@ -129,7 +129,7 @@ and print the result."
 (defcustom print-region-function nil
   "Function to call to print the region on a printer.
 See definition of `print-region-1' for calling conventions."
-  :type 'function
+  :type '(choice (const nil) function)
   :group 'lpr)
 
 (defcustom lpr-page-header-program "pr"
@@ -139,7 +139,7 @@ See definition of `print-region-1' for calling conventions."
 
 ;; Berkeley systems support -F, and GNU pr supports both -f and -F,
 ;; So it looks like -F is a better default.
-(defcustom lpr-page-header-switches '("-h" "-F")
+(defcustom lpr-page-header-switches '("-F")
   "*List of strings to use as options for the page-header-generating program.
 The variable `lpr-page-header-program' specifies the program to use."
   :type '(repeat string)
@@ -242,7 +242,8 @@ for further customization of the printer command."
            (let ((new-coords (print-region-new-buffer start end)))
              (apply 'call-process-region (car new-coords) (cdr new-coords)
                     lpr-page-header-program t t nil
-                    lpr-page-header-switches))
+                    (nconc (list "-h" title)
+                           lpr-page-header-switches)))
            (setq start (point-min)
                  end   (point-max))))
       (apply (or print-region-function 'call-process-region)