comparison lisp/packages/lpr.el @ 134:34a5b81f86ba r20-2b1

Import from CVS: tag r20-2b1
author cvs
date Mon, 13 Aug 2007 09:30:11 +0200
parents 54cc21c15cbb
children 3d6bfa290dbd
comparison
equal deleted inserted replaced
133:b27e67717092 134:34a5b81f86ba
30 ;; are `lpr-buffer', `print-buffer', lpr-region', or `print-region'; option 30 ;; are `lpr-buffer', `print-buffer', lpr-region', or `print-region'; option
31 ;; variables include `lpr-switches' and `lpr-command'. 31 ;; variables include `lpr-switches' and `lpr-command'.
32 32
33 ;;; Code: 33 ;;; Code:
34 34
35 ;;;###autoload 35 (defgroup lpr nil
36 (defvar lpr-switches nil 36 "Print Emacs buffer on line printer"
37 :group 'wp)
38
39
40 ;;;###autoload
41 (defcustom lpr-switches nil
37 "*List of strings to pass as extra options for the printer program. 42 "*List of strings to pass as extra options for the printer program.
38 See `lpr-command'.") 43 See `lpr-command'."
39 44 :type '(repeat (string :tag "Argument"))
40 (defvar lpr-add-switches (eq system-type 'berkeley-unix) 45 :group 'lpr)
46
47 (defcustom lpr-add-switches (eq system-type 'berkeley-unix)
41 "*Non-nil means construct -T and -J options for the printer program. 48 "*Non-nil means construct -T and -J options for the printer program.
42 These are made assuming that the program is `lpr'; 49 These are made assuming that the program is `lpr';
43 if you are using some other incompatible printer program, 50 if you are using some other incompatible printer program,
44 this variable should be nil.") 51 this variable should be nil."
45 52 :type 'boolean
46 ;;;###autoload 53 :group 'lpr)
47 (defvar lpr-command 54
55 ;;;###autoload
56 (defcustom lpr-command
48 (if (memq system-type '(usg-unix-v dgux hpux irix)) 57 (if (memq system-type '(usg-unix-v dgux hpux irix))
49 "lp" "lpr") 58 "lp" "lpr")
50 "*Name of program for printing a file.") 59 "*Name of program for printing a file."
60 :type 'string
61 :group 'lpr)
51 62
52 ;; Default is nil, because that enables us to use pr -f 63 ;; Default is nil, because that enables us to use pr -f
53 ;; which is more reliable than pr with no args, which is what lpr -p does. 64 ;; which is more reliable than pr with no args, which is what lpr -p does.
54 (defvar lpr-headers-switches nil 65 (defcustom lpr-headers-switches nil
55 "*List of strings of options to request page headings in the printer program. 66 "*List of strings of options to request page headings in the printer program.
56 If nil, we run `lpr-page-header-program' to make page headings 67 If nil, we run `lpr-page-header-program' to make page headings
57 and print the result.") 68 and print the result."
58 69 :type '(repeat (string :tag "Argument"))
59 (defvar print-region-function nil 70 :group 'lpr)
71
72 (defcustom print-region-function nil
60 "Function to call to print the region on a printer. 73 "Function to call to print the region on a printer.
61 See definition of `print-region-1' for calling conventions.") 74 See definition of `print-region-1' for calling conventions."
62 75 :type 'function
63 (defvar lpr-page-header-program "pr" 76 :group 'lpr)
64 "*Name of program for adding page headers to a file.") 77
65 78 (defcustom lpr-page-header-program "pr"
66 (defvar lpr-page-header-switches '("-f") 79 "*Name of program for adding page headers to a file."
80 :type 'string
81 :group 'lpr)
82
83 (defcustom lpr-page-header-switches '("-f")
67 "*List of strings to use as options for the page-header-generating program. 84 "*List of strings to use as options for the page-header-generating program.
68 The variable `lpr-page-header-program' specifies the program to use.") 85 The variable `lpr-page-header-program' specifies the program to use."
86 :type '(repeat string)
87 :group 'lpr)
69 88
70 ;;;###autoload 89 ;;;###autoload
71 (defun lpr-buffer () 90 (defun lpr-buffer ()
72 "Print buffer contents as with Unix command `lpr'. 91 "Print buffer contents as with Unix command `lpr'.
73 `lpr-switches' is a list of extra switches (strings) to pass to lpr." 92 `lpr-switches' is a list of extra switches (strings) to pass to lpr."