aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2007-02-07 13:40:10 +0000
committerVinicius Jose Latorre2007-02-07 13:40:10 +0000
commit5167749c66455ef691d2011ce32a863a28e9f481 (patch)
tree9ed50e2db6e77212496db32fcb272e3c09a5163c
parentef060075521d3e20e6ef7fcb5f6dfa32aba1f38d (diff)
downloademacs-5167749c66455ef691d2011ce32a863a28e9f481.tar.gz
emacs-5167749c66455ef691d2011ce32a863a28e9f481.zip
Fix background color printing
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/ps-print.el54
2 files changed, 40 insertions, 24 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d1a7f56b2e1..1488d6ef4bc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12007-02-07 Vinicius Jose Latorre <viniciusjl@ig.com.br>
2
3 * ps-print.ps: The ps-print commands without face printing should not
4 print background color. Reported by Leo <sdl.web@gmail.com>.
5 (ps-print-version): New version 6.7.3.
6 (ps-begin-job): New arg. Fix ps-default-background and
7 ps-default-foreground initialization.
8 (ps-face-attributes): Fix doc string.
9 (ps-face-background, ps-generate-postscript, ps-generate): Fix code.
10
12007-02-06 Chong Yidong <cyd@stupidchicken.com> 112007-02-06 Chong Yidong <cyd@stupidchicken.com>
2 12
3 * faces.el (face-set-after-frame-default): Compile attributes to 13 * faces.el (face-set-after-frame-default): Compile attributes to
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 514c55e7dd6..7a9263b0ea8 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.2 13;; Version: 6.7.3
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.2" 16(defconst ps-print-version "6.7.3"
17 "ps-print.el, v 6.7.2 <2007/01/26 vinicius> 17 "ps-print.el, v 6.7.3 <2007/02/06 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
@@ -5838,7 +5838,7 @@ XSTART YSTART are the relative position for the first page in a sheet.")
5838 )) 5838 ))
5839 5839
5840 5840
5841(defun ps-begin-job () 5841(defun ps-begin-job (genfunc)
5842 ;; prologue files 5842 ;; prologue files
5843 (or (equal ps-mark-code-directory ps-postscript-code-directory) 5843 (or (equal ps-mark-code-directory ps-postscript-code-directory)
5844 (setq ps-print-prologue-0 (ps-prologue-file 0) 5844 (setq ps-print-prologue-0 (ps-prologue-file 0)
@@ -5909,6 +5909,8 @@ XSTART YSTART are the relative position for the first page in a sheet.")
5909 (t "[\t\n\f]")) 5909 (t "[\t\n\f]"))
5910 ps-default-background (ps-rgb-color 5910 ps-default-background (ps-rgb-color
5911 (cond 5911 (cond
5912 ((eq genfunc 'ps-generate-postscript)
5913 nil)
5912 ((eq ps-default-bg 'frame-parameter) 5914 ((eq ps-default-bg 'frame-parameter)
5913 (ps-frame-parameter 'background-color)) 5915 (ps-frame-parameter 'background-color))
5914 ((eq ps-default-bg t) 5916 ((eq ps-default-bg t)
@@ -5918,6 +5920,8 @@ XSTART YSTART are the relative position for the first page in a sheet.")
5918 1.0) 5920 1.0)
5919 ps-default-foreground (ps-rgb-color 5921 ps-default-foreground (ps-rgb-color
5920 (cond 5922 (cond
5923 ((eq genfunc 'ps-generate-postscript)
5924 nil)
5921 ((eq ps-default-fg 'frame-parameter) 5925 ((eq ps-default-fg 'frame-parameter)
5922 (ps-frame-parameter 'foreground-color)) 5926 (ps-frame-parameter 'foreground-color))
5923 ((eq ps-default-fg t) 5927 ((eq ps-default-fg t)
@@ -6321,7 +6325,7 @@ If FACE is not in `ps-print-face-extension-alist' or in
6321`ps-print-face-alist', insert it on `ps-print-face-alist' and 6325`ps-print-face-alist', insert it on `ps-print-face-alist' and
6322return the attribute vector. 6326return the attribute vector.
6323 6327
6324If FACE is not a valid face name, it is used default face." 6328If FACE is not a valid face name, use default face."
6325 (cond 6329 (cond
6326 (ps-black-white-faces-alist 6330 (ps-black-white-faces-alist
6327 (or (and (symbolp face) 6331 (or (and (symbolp face)
@@ -6346,23 +6350,25 @@ If FACE is not a valid face name, it is used default face."
6346 6350
6347 6351
6348(defun ps-face-background (face background) 6352(defun ps-face-background (face background)
6349 (and (or (eq ps-use-face-background t) 6353 (and (cond ((eq ps-use-face-background t)) ; always
6350 (cond ((symbolp face) 6354 ((null ps-use-face-background) nil) ; never
6351 (memq face ps-use-face-background)) 6355 ;; ps-user-face-background is a symbol face list
6352 ((listp face) 6356 ((symbolp face)
6353 (or (memq (car face) '(foreground-color background-color)) 6357 (memq face ps-use-face-background))
6354 (let (ok) 6358 ((listp face)
6355 (while face 6359 (or (memq (car face) '(foreground-color background-color))
6356 (if (or (memq (car face) ps-use-face-background) 6360 (let (ok)
6357 (memq (car face) 6361 (while face
6358 '(foreground-color background-color))) 6362 (if (or (memq (car face) ps-use-face-background)
6359 (setq face nil 6363 (memq (car face)
6360 ok t) 6364 '(foreground-color background-color)))
6361 (setq face (cdr face)))) 6365 (setq face nil
6362 ok))) 6366 ok t)
6363 (t 6367 (setq face (cdr face))))
6364 nil) 6368 ok)))
6365 )) 6369 (t
6370 nil)
6371 )
6366 background)) 6372 background))
6367 6373
6368 6374
@@ -6629,7 +6635,7 @@ If FACE is not a valid face name, it is used default face."
6629 (ps-plot-with-face from to face)))) 6635 (ps-plot-with-face from to face))))
6630 6636
6631(defun ps-generate-postscript (from to) 6637(defun ps-generate-postscript (from to)
6632 (ps-plot-region from to 0 nil)) 6638 (ps-plot-region from to 0))
6633 6639
6634(defun ps-generate (buffer from to genfunc) 6640(defun ps-generate (buffer from to genfunc)
6635 (save-excursion 6641 (save-excursion
@@ -6665,7 +6671,7 @@ If FACE is not a valid face name, it is used default face."
6665 (save-excursion 6671 (save-excursion
6666 (let ((ps-print-page-p t) 6672 (let ((ps-print-page-p t)
6667 ps-even-or-odd-pages) 6673 ps-even-or-odd-pages)
6668 (ps-begin-job) 6674 (ps-begin-job genfunc)
6669 (when needs-begin-file 6675 (when needs-begin-file
6670 (ps-begin-file) 6676 (ps-begin-file)
6671 (ps-mule-initialize)) 6677 (ps-mule-initialize))