changeset 51864:6edc2212d82e

Print line number correctly in a region.
author Vinicius Jose Latorre <viniciusjl@ig.com.br>
date Thu, 10 Jul 2003 22:29:13 +0000
parents 92136293d672
children 4510b8eaa84a
files lisp/ChangeLog lisp/ps-print.el
diffstat 2 files changed, 15 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jul 10 16:31:43 2003 +0000
+++ b/lisp/ChangeLog	Thu Jul 10 22:29:13 2003 +0000
@@ -1,3 +1,10 @@
+2003-07-10  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
+
+	* ps-print.el: Print line number correctly in a region.  Reported by
+	Tim Allen <timallen@ls83.fsnet.co.uk>
+	(ps-print-version): New version number (6.6.2).
+	(ps-printing-region): Code fix.
+
 2003-07-10  John Paul Wallington  <jpw@gnu.org>
 
 	* progmodes/etags.el (visit-tags-table-buffer): Add autoload cookie;
--- a/lisp/ps-print.el	Thu Jul 10 16:31:43 2003 +0000
+++ b/lisp/ps-print.el	Thu Jul 10 22:29:13 2003 +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: <2003/05/14 22:34:05 vinicius>
-;; Version: 6.6.1
+;; Time-stamp: <2003/07/10 19:19:12 vinicius>
+;; Version: 6.6.2
 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
 
-(defconst ps-print-version "6.6.1"
-  "ps-print.el, v 6.6.1 <2003/05/14 vinicius>
+(defconst ps-print-version "6.6.2"
+  "ps-print.el, v 6.6.2 <2003/07/10 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
@@ -4126,7 +4126,7 @@
 
 (defun ps-spool-without-faces (from to &optional region-p)
   (run-hooks 'ps-print-hook)
-  (ps-printing-region region-p from)
+  (ps-printing-region region-p from to)
   (ps-generate (current-buffer) from to 'ps-generate-postscript))
 
 
@@ -4137,7 +4137,7 @@
 
 (defun ps-spool-with-faces (from to &optional region-p)
   (run-hooks 'ps-print-hook)
-  (ps-printing-region region-p from)
+  (ps-printing-region region-p from to)
   (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces))
 
 
@@ -4167,11 +4167,11 @@
   "Non-nil means ps-print is printing a region.")
 
 
-(defun ps-printing-region (region-p from)
+(defun ps-printing-region (region-p from to)
   (setq ps-printing-region-p region-p
 	ps-printing-region
 	(cons (if region-p
-		  (ps-count-lines (point-min) from)
+		  (ps-count-lines (point-min) (min from to))
 		1)
 	      (ps-count-lines (point-min) (point-max)))))