diff options
| author | Vinicius Jose Latorre | 2007-02-07 13:40:54 +0000 |
|---|---|---|
| committer | Vinicius Jose Latorre | 2007-02-07 13:40:54 +0000 |
| commit | e85cca87c748fce8244960afd7fe5bdcd5ebd70d (patch) | |
| tree | 49896e5644f11f8168fa654b109d3ae238faa390 | |
| parent | 4a6a3d18011e51546d433bf1d19aa1971f8c782e (diff) | |
| download | emacs-e85cca87c748fce8244960afd7fe5bdcd5ebd70d.tar.gz emacs-e85cca87c748fce8244960afd7fe5bdcd5ebd70d.zip | |
Fix background color printing
| -rw-r--r-- | lisp/ChangeLog.unicode | 10 | ||||
| -rw-r--r-- | lisp/ps-print.el | 54 |
2 files changed, 40 insertions, 24 deletions
diff --git a/lisp/ChangeLog.unicode b/lisp/ChangeLog.unicode index d9031e58812..4605a91bb22 100644 --- a/lisp/ChangeLog.unicode +++ b/lisp/ChangeLog.unicode | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2007-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 7.2.2. | ||
| 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 | |||
| 1 | 2007-01-30 Kenichi Handa <handa@m17n.org> | 11 | 2007-01-30 Kenichi Handa <handa@m17n.org> |
| 2 | 12 | ||
| 3 | * international/mule-diag.el (list-character-sets-2): Don't print | 13 | * international/mule-diag.el (list-character-sets-2): Don't print |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 4f88fdc8614..d25083d1c89 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: 7.2.1 | 13 | ;; Version: 7.2.2 |
| 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 "7.2.1" | 16 | (defconst ps-print-version "7.2.2" |
| 17 | "ps-print.el, v 7.2.1 <2007/01/26 vinicius> | 17 | "ps-print.el, v 7.2.2 <2007/02/07 vinicius> |
| 18 | 18 | ||
| 19 | Vinicius's last change version -- this file may have been edited as part of | 19 | Vinicius's last change version -- this file may have been edited as part of |
| 20 | Emacs without changes to the version number. When reporting bugs, please also | 20 | Emacs without changes to the version number. When reporting bugs, please also |
| @@ -5623,7 +5623,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 5623 | 5623 | ||
| 5624 | (defvar ps-basic-plot-string-function 'ps-basic-plot-string) | 5624 | (defvar ps-basic-plot-string-function 'ps-basic-plot-string) |
| 5625 | 5625 | ||
| 5626 | (defun ps-begin-job () | 5626 | (defun ps-begin-job (genfunc) |
| 5627 | ;; prologue files | 5627 | ;; prologue files |
| 5628 | (or (equal ps-mark-code-directory ps-postscript-code-directory) | 5628 | (or (equal ps-mark-code-directory ps-postscript-code-directory) |
| 5629 | (setq ps-print-prologue-0 (ps-prologue-file 0) | 5629 | (setq ps-print-prologue-0 (ps-prologue-file 0) |
| @@ -5694,6 +5694,8 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 5694 | (t "[\t\n\f]")) | 5694 | (t "[\t\n\f]")) |
| 5695 | ps-default-background (ps-rgb-color | 5695 | ps-default-background (ps-rgb-color |
| 5696 | (cond | 5696 | (cond |
| 5697 | ((eq genfunc 'ps-generate-postscript) | ||
| 5698 | nil) | ||
| 5697 | ((eq ps-default-bg 'frame-parameter) | 5699 | ((eq ps-default-bg 'frame-parameter) |
| 5698 | (ps-frame-parameter 'background-color)) | 5700 | (ps-frame-parameter 'background-color)) |
| 5699 | ((eq ps-default-bg t) | 5701 | ((eq ps-default-bg t) |
| @@ -5703,6 +5705,8 @@ XSTART YSTART are the relative position for the first page in a sheet.") | |||
| 5703 | 1.0) | 5705 | 1.0) |
| 5704 | ps-default-foreground (ps-rgb-color | 5706 | ps-default-foreground (ps-rgb-color |
| 5705 | (cond | 5707 | (cond |
| 5708 | ((eq genfunc 'ps-generate-postscript) | ||
| 5709 | nil) | ||
| 5706 | ((eq ps-default-fg 'frame-parameter) | 5710 | ((eq ps-default-fg 'frame-parameter) |
| 5707 | (ps-frame-parameter 'foreground-color)) | 5711 | (ps-frame-parameter 'foreground-color)) |
| 5708 | ((eq ps-default-fg t) | 5712 | ((eq ps-default-fg t) |
| @@ -6069,7 +6073,7 @@ If FACE is not in `ps-print-face-extension-alist' or in | |||
| 6069 | `ps-print-face-alist', insert it on `ps-print-face-alist' and | 6073 | `ps-print-face-alist', insert it on `ps-print-face-alist' and |
| 6070 | return the attribute vector. | 6074 | return the attribute vector. |
| 6071 | 6075 | ||
| 6072 | If FACE is not a valid face name, it is used default face." | 6076 | If FACE is not a valid face name, use default face." |
| 6073 | (cond | 6077 | (cond |
| 6074 | (ps-black-white-faces-alist | 6078 | (ps-black-white-faces-alist |
| 6075 | (or (and (symbolp face) | 6079 | (or (and (symbolp face) |
| @@ -6094,23 +6098,25 @@ If FACE is not a valid face name, it is used default face." | |||
| 6094 | 6098 | ||
| 6095 | 6099 | ||
| 6096 | (defun ps-face-background (face background) | 6100 | (defun ps-face-background (face background) |
| 6097 | (and (or (eq ps-use-face-background t) | 6101 | (and (cond ((eq ps-use-face-background t)) ; always |
| 6098 | (cond ((symbolp face) | 6102 | ((null ps-use-face-background) nil) ; never |
| 6099 | (memq face ps-use-face-background)) | 6103 | ;; ps-user-face-background is a symbol face list |
| 6100 | ((listp face) | 6104 | ((symbolp face) |
| 6101 | (or (memq (car face) '(foreground-color background-color)) | 6105 | (memq face ps-use-face-background)) |
| 6102 | (let (ok) | 6106 | ((listp face) |
| 6103 | (while face | 6107 | (or (memq (car face) '(foreground-color background-color)) |
| 6104 | (if (or (memq (car face) ps-use-face-background) | 6108 | (let (ok) |
| 6105 | (memq (car face) | 6109 | (while face |
| 6106 | '(foreground-color background-color))) | 6110 | (if (or (memq (car face) ps-use-face-background) |
| 6107 | (setq face nil | 6111 | (memq (car face) |
| 6108 | ok t) | 6112 | '(foreground-color background-color))) |
| 6109 | (setq face (cdr face)))) | 6113 | (setq face nil |
| 6110 | ok))) | 6114 | ok t) |
| 6111 | (t | 6115 | (setq face (cdr face)))) |
| 6112 | nil) | 6116 | ok))) |
| 6113 | )) | 6117 | (t |
| 6118 | nil) | ||
| 6119 | ) | ||
| 6114 | background)) | 6120 | background)) |
| 6115 | 6121 | ||
| 6116 | 6122 | ||
| @@ -6259,7 +6265,7 @@ If FACE is not a valid face name, it is used default face." | |||
| 6259 | (ps-generate-postscript-with-faces1 from to))) | 6265 | (ps-generate-postscript-with-faces1 from to))) |
| 6260 | 6266 | ||
| 6261 | (defun ps-generate-postscript (from to) | 6267 | (defun ps-generate-postscript (from to) |
| 6262 | (ps-plot-region from to 0 nil)) | 6268 | (ps-plot-region from to 0)) |
| 6263 | 6269 | ||
| 6264 | (defun ps-generate (buffer from to genfunc) | 6270 | (defun ps-generate (buffer from to genfunc) |
| 6265 | (save-excursion | 6271 | (save-excursion |
| @@ -6295,7 +6301,7 @@ If FACE is not a valid face name, it is used default face." | |||
| 6295 | (save-excursion | 6301 | (save-excursion |
| 6296 | (let ((ps-print-page-p t) | 6302 | (let ((ps-print-page-p t) |
| 6297 | ps-even-or-odd-pages) | 6303 | ps-even-or-odd-pages) |
| 6298 | (ps-begin-job) | 6304 | (ps-begin-job genfunc) |
| 6299 | (when needs-begin-file | 6305 | (when needs-begin-file |
| 6300 | (ps-begin-file) | 6306 | (ps-begin-file) |
| 6301 | (ps-mule-initialize)) | 6307 | (ps-mule-initialize)) |