aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2007-07-25 00:06:45 +0000
committerVinicius Jose Latorre2007-07-25 00:06:45 +0000
commitb104099294036821947ea9b86599b92634d20803 (patch)
tree9726ded86706985a2d432ca7ebbd4a8c54be3b6c
parentee04257d006509d37401131d8f2a524956167d3f (diff)
downloademacs-b104099294036821947ea9b86599b92634d20803.tar.gz
emacs-b104099294036821947ea9b86599b92634d20803.zip
Fix foreground/background color
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/ps-print.el45
2 files changed, 37 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b5d851e6345..9a7931fe6be 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12007-07-24 Vinicius Jose Latorre <viniciusjl@ig.com.br>
2
3 * ps-print.el: Problem with foreground and background color when
4 printing a buffer with and without faces. Reported by Christian
5 Schlauer <cs-muelleimer-rubbish.bin@arcor.de>.
6 (ps-print-version): New version 6.7.5.
7 (ps-default-fg): Change default value to nil, so black color is used
8 when a face does not specify a foreground color.
9 (ps-default-bg): Change default value to nil, so white color is used
10 for background color.
11 (ps-begin-job): Fix code.
12
12007-07-24 Dan Nicolaescu <dann@ics.uci.edu> 132007-07-24 Dan Nicolaescu <dann@ics.uci.edu>
2 14
3 * vc-hg.el (vc-hg-revision-completion-table): Temporarily comment 15 * vc-hg.el (vc-hg-revision-completion-table): Temporarily comment
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 9db03217e5f..32a41252abb 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -10,11 +10,11 @@
10;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) 10;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters)
11;; Vinicius Jose Latorre <viniciusjl@ig.com.br> 11;; Vinicius Jose Latorre <viniciusjl@ig.com.br>
12;; Keywords: wp, print, PostScript 12;; Keywords: wp, print, PostScript
13;; Version: 6.7.4 13;; Version: 6.7.5
14;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre 14;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
15 15
16(defconst ps-print-version "6.7.4" 16(defconst ps-print-version "6.7.5"
17 "ps-print.el, v 6.7.4 <2007/05/13 vinicius> 17 "ps-print.el, v 6.7.5 <2007/07/20 vinicius>
18 18
19Vinicius's last change version -- this file may have been edited as part of 19Vinicius's last change version -- this file may have been edited as part of
20Emacs without changes to the version number. When reporting bugs, please also 20Emacs without changes to the version number. When reporting bugs, please also
@@ -2987,7 +2987,7 @@ Any other value is treated as t."
2987 :version "20" 2987 :version "20"
2988 :group 'ps-print-color) 2988 :group 'ps-print-color)
2989 2989
2990(defcustom ps-default-fg 'frame-parameter 2990(defcustom ps-default-fg nil
2991 "*RGB values of the default foreground color. 2991 "*RGB values of the default foreground color.
2992 2992
2993The `ps-default-fg' variable contains the default foreground color used by 2993The `ps-default-fg' variable contains the default foreground color used by
@@ -3030,7 +3030,7 @@ It's used only when `ps-print-color-p' is non-nil."
3030 :version "20" 3030 :version "20"
3031 :group 'ps-print-color) 3031 :group 'ps-print-color)
3032 3032
3033(defcustom ps-default-bg "white" 3033(defcustom ps-default-bg nil
3034 "*RGB values of the default background color. 3034 "*RGB values of the default background color.
3035 3035
3036The `ps-default-bg' variable contains the default background color used by 3036The `ps-default-bg' variable contains the default background color used by
@@ -3702,7 +3702,7 @@ The table depends on the current ps-print setup."
3702;; ps-page-dimensions-database 3702;; ps-page-dimensions-database
3703;; ps-font-info-database 3703;; ps-font-info-database
3704 3704
3705;;; ps-print - end of settings\n") 3705\;;; ps-print - end of settings\n")
3706 "\n"))) 3706 "\n")))
3707 3707
3708 3708
@@ -5622,9 +5622,11 @@ XSTART YSTART are the relative position for the first page in a sheet.")
5622 ps-zebra-stripe-height) 5622 ps-zebra-stripe-height)
5623 "/ZebraColor " 5623 "/ZebraColor "
5624 (ps-format-color ps-zebra-color 0.95) 5624 (ps-format-color ps-zebra-color 0.95)
5625 "def\n/BackgroundColor " 5625 "def\n")
5626 (ps-output "/BackgroundColor "
5626 (ps-format-color ps-default-background 1.0) 5627 (ps-format-color ps-default-background 1.0)
5627 "def\n/UseSetpagedevice " 5628 "def\n")
5629 (ps-output "/UseSetpagedevice "
5628 (if (eq ps-spool-config 'setpagedevice) 5630 (if (eq ps-spool-config 'setpagedevice)
5629 "/setpagedevice where{pop languagelevel 2 eq}{false}ifelse" 5631 "/setpagedevice where{pop languagelevel 2 eq}{false}ifelse"
5630 "false") 5632 "false")
@@ -5909,9 +5911,17 @@ XSTART YSTART are the relative position for the first page in a sheet.")
5909 ((eq ps-print-control-characters 'control) 5911 ((eq ps-print-control-characters 'control)
5910 "[\000-\037\177]") 5912 "[\000-\037\177]")
5911 (t "[\t\n\f]")) 5913 (t "[\t\n\f]"))
5914 ;; Set the color scale. We do it here instead of in the defvar so
5915 ;; that ps-print can be dumped into emacs. This expression can't be
5916 ;; evaluated at dump-time because X isn't initialized.
5917 ps-color-p (and ps-print-color-p (ps-color-device))
5918 ps-print-color-scale (if ps-color-p
5919 (float (car (ps-color-values "white")))
5920 1.0)
5912 ps-default-background (ps-rgb-color 5921 ps-default-background (ps-rgb-color
5913 (cond 5922 (cond
5914 ((eq genfunc 'ps-generate-postscript) 5923 ((or (not (eq ps-print-color-p t))
5924 (eq genfunc 'ps-generate-postscript))
5915 nil) 5925 nil)
5916 ((eq ps-default-bg 'frame-parameter) 5926 ((eq ps-default-bg 'frame-parameter)
5917 (ps-frame-parameter nil 'background-color)) 5927 (ps-frame-parameter nil 'background-color))
@@ -5923,7 +5933,8 @@ XSTART YSTART are the relative position for the first page in a sheet.")
5923 1.0) 5933 1.0)
5924 ps-default-foreground (ps-rgb-color 5934 ps-default-foreground (ps-rgb-color
5925 (cond 5935 (cond
5926 ((eq genfunc 'ps-generate-postscript) 5936 ((or (not (eq ps-print-color-p t))
5937 (eq genfunc 'ps-generate-postscript))
5927 nil) 5938 nil)
5928 ((eq ps-default-fg 'frame-parameter) 5939 ((eq ps-default-fg 'frame-parameter)
5929 (ps-frame-parameter nil 'foreground-color)) 5940 (ps-frame-parameter nil 'foreground-color))
@@ -5933,15 +5944,9 @@ XSTART YSTART are the relative position for the first page in a sheet.")
5933 ps-default-fg)) 5944 ps-default-fg))
5934 "unspecified-fg" 5945 "unspecified-fg"
5935 0.0) 5946 0.0)
5936 ps-default-color (and (eq ps-print-color-p t) ps-default-foreground) 5947 ps-default-color (and (eq ps-print-color-p t)
5937 ps-current-color ps-default-color 5948 ps-default-foreground)
5938 ;; Set the color scale. We do it here instead of in the defvar so 5949 ps-current-color ps-default-color)
5939 ;; that ps-print can be dumped into emacs. This expression can't be
5940 ;; evaluated at dump-time because X isn't initialized.
5941 ps-color-p (and ps-print-color-p (ps-color-device))
5942 ps-print-color-scale (if ps-color-p
5943 (float (car (ps-color-values "white")))
5944 1.0))
5945 ;; initialize page dimensions 5950 ;; initialize page dimensions
5946 (ps-get-page-dimensions) 5951 (ps-get-page-dimensions)
5947 ;; final check 5952 ;; final check
@@ -7073,5 +7078,5 @@ It is assumed that the length of STRING is not zero.")
7073 7078
7074(provide 'ps-print) 7079(provide 'ps-print)
7075 7080
7076;;; arch-tag: fb06a585-1112-4206-885d-a57d95d50579 7081;; arch-tag: fb06a585-1112-4206-885d-a57d95d50579
7077;;; ps-print.el ends here 7082;;; ps-print.el ends here