aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Voelker1998-12-07 19:27:26 +0000
committerGeoff Voelker1998-12-07 19:27:26 +0000
commita953784890260e2504b7dcb9bebf07a2469c8615 (patch)
treef455529c4d3fd948409eb3c577269d4e3aabad59
parente9847e6c13b4ce0eca9748444385de3658425a50 (diff)
downloademacs-a953784890260e2504b7dcb9bebf07a2469c8615.tar.gz
emacs-a953784890260e2504b7dcb9bebf07a2469c8615.zip
(ps-do-despool) [ms-dos, windows-nt]: Ditto for
ps-printer-name.
-rw-r--r--lisp/ps-print.el24
1 files changed, 19 insertions, 5 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 7a6a2287de4..25f08f5fbe8 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -5306,12 +5306,26 @@ If FACE is not a valid face name, it is used default face."
5306 (let* ((coding-system-for-write 'raw-text-unix) 5306 (let* ((coding-system-for-write 'raw-text-unix)
5307 (ps-printer-name (or ps-printer-name printer-name)) 5307 (ps-printer-name (or ps-printer-name printer-name))
5308 (ps-lpr-switches 5308 (ps-lpr-switches
5309 (append (and (stringp ps-printer-name) 5309 (append
5310 (list (concat "-P" ps-printer-name))) 5310 (and (stringp ps-printer-name)
5311 ps-lpr-switches))) 5311 (list (concat "-P" ps-printer-name)))
5312 ps-lpr-switches)))
5312 (if (and (memq system-type '(ms-dos windows-nt)) 5313 (if (and (memq system-type '(ms-dos windows-nt))
5313 (stringp ps-printer-name)) 5314 (or (and (boundp 'dos-ps-printer)
5314 (write-region (point-min) (point-max) ps-printer-name t 0) 5315 (stringp (symbol-value 'dos-ps-printer)))
5316 (stringp ps-printer-name)))
5317 (let ((printer (or (and (boundp 'dos-ps-printer)
5318 (stringp (symbol-value 'dos-ps-printer))
5319 (symbol-value 'dos-ps-printer))
5320 ps-printer-name))
5321 ;; It seems that we must be careful about the
5322 ;; directory name that gets added by write-region
5323 ;; when using the standard "PRN" or "LPTx" ports.
5324 ;; The call can fail if the directory is on a
5325 ;; network drive.
5326 (safe-dir (or (getenv "windir") (getenv "TMPDIR") "c:/")))
5327 (write-region (point-min) (point-max)
5328 (expand-file-name printer safe-dir) t 0))
5315 (apply 'call-process-region 5329 (apply 'call-process-region
5316 (point-min) (point-max) ps-lpr-command nil 5330 (point-min) (point-max) ps-lpr-command nil
5317 (and (fboundp 'start-process) 0) 5331 (and (fboundp 'start-process) 0)