changeset 63807:11342f636d93

ps-print selection page fix
author Vinicius Jose Latorre <viniciusjl@ig.com.br>
date Tue, 28 Jun 2005 03:13:02 +0000
parents 5fe0a030abf2
children 8db64e24d5dc
files lisp/ChangeLog lisp/ps-print.el
diffstat 2 files changed, 19 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Jun 28 02:27:46 2005 +0000
+++ b/lisp/ChangeLog	Tue Jun 28 03:13:02 2005 +0000
@@ -1,3 +1,11 @@
+2005-06-27  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
+
+	* ps-print.el: It was not working the page selection for printing.
+	Reported by Sebastian Tennant <sebyte@smolny.plus.com>.
+	(ps-print-version): New version 6.6.7.
+	(ps-end-sheet): New fun.
+	(ps-header-sheet, ps-end-job): Call it.
+
 2005-06-27  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* subr.el (add-to-list, add-to-ordered-list): Doc fixes.
--- a/lisp/ps-print.el	Tue Jun 28 02:27:46 2005 +0000
+++ b/lisp/ps-print.el	Tue Jun 28 03:13:02 2005 +0000
@@ -10,12 +10,12 @@
 ;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
 ;;	Vinicius Jose Latorre <viniciusjl@ig.com.br>
 ;; Keywords: wp, print, PostScript
-;; Time-stamp: <2005/03/19 00:40:12 vinicius>
-;; Version: 6.6.6
+;; Time-stamp: <2005/06/27 00:57:22 vinicius>
+;; Version: 6.6.7
 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
 
 (defconst ps-print-version "6.6.6"
-  "ps-print.el, v 6.6.6 <2005/03/19 vinicius>
+  "ps-print.el, v 6.6.7 <2005/06/27 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, please also
@@ -5961,10 +5961,14 @@
   (ps-begin-page))
 
 
+(defun ps-end-sheet ()
+  (and ps-print-page-p (> ps-page-sheet 0)
+       (ps-output "EndSheet\n")))
+
+
 (defun ps-header-sheet ()
   ;; Print only when a new sheet begins.
-  (and ps-print-page-p (> ps-page-sheet 0)
-       (ps-output "EndSheet\n"))
+  (ps-end-sheet)
   (setq ps-page-sheet (1+ ps-page-sheet))
   (when (ps-print-sheet-p)
     (setq ps-page-order (1+ ps-page-order))
@@ -6689,8 +6693,7 @@
 
 
 (defun ps-end-job (needs-begin-file)
-  (let ((previous-print ps-print-page-p)
-	(ps-print-page-p t))
+  (let ((ps-print-page-p t))
     (ps-flush-output)
     (save-excursion
       (let ((pages-per-sheet (mod ps-page-printed ps-n-up-printing))
@@ -6717,8 +6720,7 @@
 		      (number-to-string ps-lines-printed) " BeginPage\n")
 	   (ps-end-page)))
     ;; Set end of PostScript file
-    (and previous-print
-	 (ps-output "EndSheet\n"))
+    (ps-end-sheet)
     (ps-output "\n%%Trailer\n%%Pages: "
 	       (number-to-string
 		(if (and needs-begin-file