aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2007-07-20 17:24:39 +0000
committerVinicius Jose Latorre2007-07-20 17:24:39 +0000
commit3f0257cb934a3ac7aa7310a6adccc064219623b1 (patch)
tree4084bb980265263c95392f03a450f24011982232
parentec9bbc6ce57f8ff72d56c8c2455347ea9634b72f (diff)
downloademacs-3f0257cb934a3ac7aa7310a6adccc064219623b1.tar.gz
emacs-3f0257cb934a3ac7aa7310a6adccc064219623b1.zip
Fix foreground/background color
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/ps-print.el41
2 files changed, 35 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dfd8e484168..3a7a6c25758 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12007-07-20 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-20 Eli Zaretskii <eliz@gnu.org> 132007-07-20 Eli Zaretskii <eliz@gnu.org>
2 14
3 * makefile.w32-in (install-lisp-SH): Don't create subdirectories 15 * makefile.w32-in (install-lisp-SH): Don't create subdirectories
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 5aea27d655d..217583ed4d4 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 'frame-parameter 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
@@ -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