comparison lisp/dos-fns.el @ 22070:d8e53123116c

(dos-ps-printer, dos-printer, msdos-shells): Defcustoms replaced with defvars. (dos-fns): defgroup deleted.
author Richard M. Stallman <rms@gnu.org>
date Fri, 15 May 1998 05:43:41 +0000
parents e1756df464ff
children 681465d84b75
comparison
equal deleted inserted replaced
22069:3df130425e5e 22070:d8e53123116c
25 ;;; Commentary: 25 ;;; Commentary:
26 26
27 ;; Part of this code is taken from (or derived from) demacs. 27 ;; Part of this code is taken from (or derived from) demacs.
28 28
29 ;;; Code: 29 ;;; Code:
30
31 (defgroup dos-fns nil
32 "MS-Dos specific functions."
33 :group 'environment)
34 30
35 ;; This overrides a trivial definition in files.el. 31 ;; This overrides a trivial definition in files.el.
36 (defun convert-standard-filename (filename) 32 (defun convert-standard-filename (filename)
37 "Convert a standard file's name to something suitable for the current OS. 33 "Convert a standard file's name to something suitable for the current OS.
38 This function's standard definition is trivial; it just returns the argument. 34 This function's standard definition is trivial; it just returns the argument.
80 ;; make sure the munged name ends with it also. 76 ;; make sure the munged name ends with it also.
81 (if (equal lastchar ?~) 77 (if (equal lastchar ?~)
82 (aset string (1- (length string)) lastchar)) 78 (aset string (1- (length string)) lastchar))
83 (concat dir string)))) 79 (concat dir string))))
84 80
85 (defcustom msdos-shells '("command.com" "4dos.com" "ndos.com") 81 ;; See dos-vars.el for defcustom.
86 "*List of shells that use `/c' instead of `-c' and a backslashed command." 82 (defvar msdos-shells)
87 :type '(repeat string)
88 :group 'dos-fns)
89 83
90 (defvar register-name-alist 84 (defvar register-name-alist
91 '((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5) 85 '((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5)
92 (cflag . 6) (flags . 7) 86 (cflag . 6) (flags . 7)
93 (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0)) 87 (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0))
125 119
126 (defsubst intdos (regs) 120 (defsubst intdos (regs)
127 (int86 33 regs)) 121 (int86 33 regs))
128 122
129 ;; Support for printing under MS-DOS, see lpr.el and ps-print.el. 123 ;; Support for printing under MS-DOS, see lpr.el and ps-print.el.
130 (defcustom dos-printer "PRN" 124 ;; See dos-vars.el for defcustom.
131 "*The name of a local MS-DOS device to which data is sent for printing. 125 (defvar dos-printer)
132 \(Note that PostScript files are sent to `dos-ps-printer', which see.\)
133
134 Typical non-default settings would be \"LPT1\" to \"LPT3\" for
135 parallel printers, or \"COM1\" to \"COM4\" or \"AUX\" for serial
136 printers. You can also set it to a name of a file, in which
137 case the output gets appended to that file.
138 If you want to discard the printed output, set this to \"NUL\"."
139 :type 'file ; could use string but then we lose completion for files.
140 :group 'dos-fns)
141 126
142 (defun dos-print-region-function (start end 127 (defun dos-print-region-function (start end
143 &optional lpr-prog 128 &optional lpr-prog
144 delete-text buf display rest) 129 delete-text buf display rest)
145 "MS-DOS-specific function to print the region on a printer. 130 "MS-DOS-specific function to print the region on a printer.
176 ;; then requests to print page headers will be silently 161 ;; then requests to print page headers will be silently
177 ;; ignored, and `print-buffer' and `print-region' produce 162 ;; ignored, and `print-buffer' and `print-region' produce
178 ;; the same output as `lpr-buffer' and `lpr-region', accordingly. 163 ;; the same output as `lpr-buffer' and `lpr-region', accordingly.
179 (setq lpr-headers-switches "(page headers are not supported)") 164 (setq lpr-headers-switches "(page headers are not supported)")
180 165
181 (defcustom dos-ps-printer "PRN" 166 ;; See dos-vars.el for defcustom.
182 "*Method for printing PostScript files under MS-DOS. 167 (defvar dos-ps-printer)
183
184 If the value is a string, then it is taken as the name of the
185 device to which PostScript files are written. By default it
186 is the default printer device; typical non-default settings
187 would be \"LPT1\" to \"LPT3\" for parallel printers, or \"COM1\"
188 to \"COM4\" or \"AUX\" for serial printers. You can also set it
189 to a name of a file, in which case the output gets appended
190 to that file. \(Note that `ps-print' package already has
191 facilities for printing to a file, so you might as well use
192 them instead of changing the setting of this variable.\) If
193 you want to silently discard the printed output, set this to \"NUL\".
194
195 If the value is anything but a string, PostScript files will be
196 piped to the program given by `ps-lpr-command', with switches
197 given by `ps-lpr-switches', which see."
198 :type '(choice file (const :tag "Pipe to ps-lpr-command" pipe))
199 :group 'dos-fns)
200 168
201 (setq ps-lpr-command "gs") 169 (setq ps-lpr-command "gs")
202 170
203 (setq ps-lpr-switches '("-q" "-dNOPAUSE" "-sDEVICE=epson" "-r240x60" 171 (setq ps-lpr-switches '("-q" "-dNOPAUSE" "-sDEVICE=epson" "-r240x60"
204 "-sOutputFile=LPT1" "-")) 172 "-sOutputFile=LPT1" "-"))