Subject: PS printing buffers

From: "David J. Fiander" <[email-masked]>
Date: Tue, 1 Oct 1996 08:55:45 -0400

The outline of how to print postscript from within emacs is good,
except for two little problems:  it doesn't work for those of us
that don't use cmd.exe as our shell, and it doesn't change the
"Tools" pull-down menu to use nt-ps-print-buffer-with-faces.

I didn't have too much luck printing with faces on my B&W
postscript printer, so I don't define
nt-ps-print-buffer-with-faces, but nt-ps-print-buffer.  If you
want to use faces, just change the function names accordingly.

Here's a simple fix for both problems:

;;;
;;; Use this instead of the version of the function from the FAQ
;;; note
;;;
(defun nt-ps-print-buffer ()
  (interactive)
  (ps-print-buffer ps-lpr-buffer)
  (let ((shell-file-name "cmd.exe")	; switch back to cmd.exe temporarily
	(win32-quote-process-args nil)
	(shell-command-switch "/c"))
    (shell-command
     (apply 'concat (append (list ps-lpr-command " ")
			    ps-lpr-switches
			    (list " " ps-lpr-buffer))))))

;;;
;;; Change the menu-bar to use nt-ps-print
(define-key menu-bar-tools-menu [ps-print-buffer]
  '("Postscript Print Buffer" . nt-ps-print-buffer))