From: Gerd Moellmann Date: Thu, 23 Mar 2000 13:54:25 +0000 (+0000) Subject: Skip banner page fix. X-Git-Tag: emacs-pretest-21.0.90~4521 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=47d2ac754529212615c9eabb63ef2ac1e844c204;p=emacs.git Skip banner page fix. (ps-print-version): New version number (5.1.2). (ps-begin-file, ps-end-file, ps-generate): Code fix. --- diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 64bf6567699..07dc47281a6 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -9,11 +9,11 @@ ;; Maintainer: Kenichi Handa (multi-byte characters) ;; Maintainer: Vinicius Jose Latorre ;; Keywords: wp, print, PostScript -;; Time-stamp: <2000/03/21 00:02:42 vinicius> -;; Version: 5.1.1 +;; Time-stamp: <2000/03/22 09:12:07 vinicius> +;; Version: 5.1.2 -(defconst ps-print-version "5.1.1" - "ps-print.el, v 5.1.1 <2000/03/21 vinicius> +(defconst ps-print-version "5.1.2" + "ps-print.el, v 5.1.2 <2000/03/22 vinicius> Vinicius's last change version -- this file may have been edited as part of Emacs without changes to the version number. When reporting bugs, @@ -3740,7 +3740,6 @@ XSTART YSTART are the relative position for the first page in a sheet.") (ps-output "\n%%EndProcSet\n\n") - (ps-output-boolean "SkipFirstPage " ps-banner-page-when-duplexing) (ps-output-boolean "LandscapeMode " (or ps-landscape-mode (eq (ps-n-up-landscape n-up) 'pag))) @@ -3854,7 +3853,9 @@ XSTART YSTART are the relative position for the first page in a sheet.") "\n\n" ps-print-duplex-feature "\n%%EndFeature\n"))) - (ps-output "\n/Lines 0 def\n/PageCount 0 def\n\nBeginDoc\n%%EndSetup\n")) + (ps-output "\n/Lines 0 def\n/PageCount 0 def\n\nBeginDoc\n%%EndSetup\n") + (and ps-banner-page-when-duplexing + (ps-output "\n%%Page: 0 0\nsave showpage restore\n"))) (defun ps-insert-string (prologue) @@ -3936,7 +3937,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") (defmacro ps-page-number () `(1+ (/ (1- ps-page-count) ps-number-of-columns))) -(defun ps-end-file () +(defun ps-end-file (needs-begin-file) (ps-flush-output) ;; Back to the PS output buffer to set the last page n-up printing (save-excursion @@ -3952,7 +3953,10 @@ XSTART YSTART are the relative position for the first page in a sheet.") (ps-dummy-page)) ;; Set end of PostScript file (ps-output "EndSheet\n\n%%Trailer\n%%Pages: " - (format "%d" ps-page-order) + (format "%d" + (if (and needs-begin-file ps-banner-page-when-duplexing) + (1+ ps-page-order) + ps-page-order)) "\n\nEndDoc\n\n%%EOF\n")) @@ -4619,7 +4623,7 @@ If FACE is not a valid face name, it is used default face." (funcall genfunc from to) (ps-end-page) - (ps-end-file) + (ps-end-file needs-begin-file) (ps-end-job) ;; Setting this variable tells the unwind form that the