]> code.delx.au - gnu-emacs/commitdiff
(ps-do-despool): Bind ps-printer-name to printer-name if the former is
authorAndrew Innes <andrewi@gnu.org>
Mon, 13 Jul 1998 19:58:49 +0000 (19:58 +0000)
committerAndrew Innes <andrewi@gnu.org>
Mon, 13 Jul 1998 19:58:49 +0000 (19:58 +0000)
nil.

lisp/ps-print.el

index d5478d7da5b98f67f00696964e7df2244e7a3a05..6f18fd6857e4a94b4a07b8355ea1935072e8085e 100644 (file)
@@ -4005,12 +4005,13 @@ If FACE is not a valid face name, it is used default face."
       (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)))