changeset 22751:75c35003c69f

(ps-do-despool): Bind ps-printer-name to printer-name if the former is nil.
author Andrew Innes <andrewi@gnu.org>
date Mon, 13 Jul 1998 19:58:49 +0000
parents b38cb406ed80
children 00d24401ca1e
files lisp/ps-print.el
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ps-print.el	Mon Jul 13 19:54:15 1998 +0000
+++ b/lisp/ps-print.el	Mon Jul 13 19:58:49 1998 +0000
@@ -4005,12 +4005,13 @@
       (and ps-razzle-dazzle (message "Printing..."))
       (save-excursion
 	(set-buffer ps-spool-buffer)
-	(let ((coding-system-for-write 'raw-text-unix)
-	      (ps-lpr-switches
-	       (append
-		(and (stringp ps-printer-name)
-		     (list (concat "-P" ps-printer-name)))
-		ps-lpr-switches)))
+	(let* ((coding-system-for-write 'raw-text-unix)
+	       (ps-printer-name (or ps-printer-name printer-name))
+	       (ps-lpr-switches
+		(append
+		 (and (stringp ps-printer-name)
+		      (list (concat "-P" ps-printer-name)))
+		 ps-lpr-switches)))
 	  (if (and (memq system-type '(ms-dos windows-nt))
 		   (or (and (boundp 'dos-ps-printer)
 			    (stringp (symbol-value 'dos-ps-printer)))