aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-04-15 11:39:10 +0000
committerGerd Moellmann2000-04-15 11:39:10 +0000
commit712dc9e0f181f9afe99697a00c579ce06ddc00e4 (patch)
tree9766be37aa74050727bd68e6556bc0d25a15aa81
parentffc50f2aabbe1eb98a45e0a4394dbb8aa7531012 (diff)
downloademacs-712dc9e0f181f9afe99697a00c579ce06ddc00e4.tar.gz
emacs-712dc9e0f181f9afe99697a00c579ce06ddc00e4.zip
Check for line-beginning-position definition.
Fix counting lines in a region. (ps-print-version): New version number (5.1.5). (ps-spool-without-faces, ps-spool-with-faces): Adjust code. (ps-printing-region): Fun code fix.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/ps-print.el24
2 files changed, 25 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bbb382cbc6b..ef216574bfc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12000-04-15 Vinicius Jose Latorre <vinicius@cpqd.com.br>
2
3 * ps-print.el: Check for line-beginning-position definition.
4
5 * ps-print.el: Fix counting lines in a region.
6 (ps-print-version): New version number (5.1.5).
7 (ps-spool-without-faces, ps-spool-with-faces): Adjust code.
8 (ps-printing-region): Fun code fix.
9
12000-04-15 Gerd Moellmann <gerd@gnu.org> 102000-04-15 Gerd Moellmann <gerd@gnu.org>
2 11
3 * gud.el (gud-jdb-build-source-files-list): Change file-exists-p 12 * gud.el (gud-jdb-build-source-files-list): Change file-exists-p
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index ccef4956e46..a6edc9731d3 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -9,11 +9,11 @@
9;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) 9;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
10;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br> 10;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
11;; Keywords: wp, print, PostScript 11;; Keywords: wp, print, PostScript
12;; Time-stamp: <2000/04/09 14:06:12 vinicius> 12;; Time-stamp: <2000/04/14 11:07:23 vinicius>
13;; Version: 5.1.4 13;; Version: 5.1.5
14 14
15(defconst ps-print-version "5.1.4" 15(defconst ps-print-version "5.1.5"
16 "ps-print.el, v 5.1.4 <2000/04/09 vinicius> 16 "ps-print.el, v 5.1.5 <2000/04/14 vinicius>
17 17
18Vinicius's last change version -- this file may have been edited as part of 18Vinicius's last change version -- this file may have been edited as part of
19Emacs without changes to the version number. When reporting bugs, 19Emacs without changes to the version number. When reporting bugs,
@@ -1146,6 +1146,14 @@ Please send all bug fixes and enhancements to
1146 (char-charset (char-after arg)))) 1146 (char-charset (char-after arg))))
1147 1147
1148 1148
1149(or (fboundp 'line-beginning-position)
1150 (defun line-beginning-position (&optional n)
1151 (save-excursion
1152 (and n (/= n 1) (forward-line (1- n)))
1153 (beginning-of-line)
1154 (point))))
1155
1156
1149;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1157;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1150;; User Variables: 1158;; User Variables:
1151 1159
@@ -2690,7 +2698,7 @@ If EXTENSION is any other symbol, it is ignored."
2690 2698
2691(defun ps-spool-without-faces (from to &optional region-p) 2699(defun ps-spool-without-faces (from to &optional region-p)
2692 (run-hooks 'ps-print-hook) 2700 (run-hooks 'ps-print-hook)
2693 (ps-printing-region region-p) 2701 (ps-printing-region region-p from)
2694 (ps-generate (current-buffer) from to 'ps-generate-postscript)) 2702 (ps-generate (current-buffer) from to 'ps-generate-postscript))
2695 2703
2696 2704
@@ -2701,7 +2709,7 @@ If EXTENSION is any other symbol, it is ignored."
2701 2709
2702(defun ps-spool-with-faces (from to &optional region-p) 2710(defun ps-spool-with-faces (from to &optional region-p)
2703 (run-hooks 'ps-print-hook) 2711 (run-hooks 'ps-print-hook)
2704 (ps-printing-region region-p) 2712 (ps-printing-region region-p from)
2705 (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces)) 2713 (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces))
2706 2714
2707 2715
@@ -2725,11 +2733,11 @@ file.")
2725 "Non-nil means ps-print is printing a region.") 2733 "Non-nil means ps-print is printing a region.")
2726 2734
2727 2735
2728(defun ps-printing-region (region-p) 2736(defun ps-printing-region (region-p from)
2729 (setq ps-printing-region-p region-p 2737 (setq ps-printing-region-p region-p
2730 ps-printing-region 2738 ps-printing-region
2731 (cons (if region-p 2739 (cons (if region-p
2732 (ps-count-lines (point-min) (region-beginning)) 2740 (ps-count-lines (point-min) from)
2733 1) 2741 1)
2734 (ps-count-lines (point-min) (point-max))))) 2742 (ps-count-lines (point-min) (point-max)))))
2735 2743