Mercurial > emacs
changeset 101454:3e95fdf33fdd
Fix face background/foreground extraction.
author | Vinicius Jose Latorre <viniciusjl@ig.com.br> |
---|---|
date | Sun, 25 Jan 2009 01:20:28 +0000 |
parents | bd842f836b89 |
children | 8ed4ad32cdaf |
files | lisp/ChangeLog lisp/ps-print.el |
diffstat | 2 files changed, 24 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Jan 25 00:57:19 2009 +0000 +++ b/lisp/ChangeLog Sun Jan 25 01:20:28 2009 +0000 @@ -4,6 +4,16 @@ change its title from "Recursive grep..." to "Grep via Find...". Add menu items for lgrep and rgrep. +2009-01-24 Vinicius Jose Latorre <viniciusjl@ig.com.br> + + * ps-print.el (ps-print-version): New version 7.3.4. + +2009-01-24 Eduard Wiebe <usenet@pusto.de> (tiny change) + + * ps-print.el: Fix face background/foreground extraction. + (ps-face-extract-color): New fun. + (ps-face-attributes, ps-face-attribute-list): Code fix. + 2009-01-24 Geoff Gole <geoffgole@gmail.com> (tiny change) * align.el (align-region): Avoid infloop.
--- a/lisp/ps-print.el Sun Jan 25 00:57:19 2009 +0000 +++ b/lisp/ps-print.el Sun Jan 25 01:20:28 2009 +0000 @@ -11,11 +11,11 @@ ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) ;; Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Keywords: wp, print, PostScript -;; Version: 7.3.3 +;; Version: 7.3.4 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre -(defconst ps-print-version "7.3.3" - "ps-print.el, v 7.3.3 <2008/10/22 vinicius> +(defconst ps-print-version "7.3.4" + "ps-print.el, v 7.3.4 <2009/01/24 vinicius> Vinicius's last change version -- this file may have been edited as part of Emacs without changes to the version number. When reporting bugs, please also @@ -6235,6 +6235,13 @@ (memq attr '(foreground-color :foreground background-color :background))) +(defun ps-face-extract-color (face-attrs) + (let ((color (cdr face-attrs))) + (if (listp color) + (car color) + color))) + + (defun ps-face-attributes (face) "Return face attribute vector. @@ -6259,9 +6266,9 @@ (cons new-face ps-print-face-alist))) new-face)))) ((ps-face-foreground-color-p (car face)) - (vector 0 (cdr face) nil)) + (vector 0 (ps-face-extract-color face) nil)) ((ps-face-background-color-p (car face)) - (vector 0 nil (cdr face))) + (vector 0 nil (ps-face-extract-color face))) (t (vector 0 nil nil)))) @@ -6295,10 +6302,10 @@ (ps-face-attributes face-or-list)) ;; only foreground color, not a `real' face ((ps-face-foreground-color-p (car face-or-list)) - (vector 0 (cdr face-or-list) nil)) + (vector 0 (ps-face-extract-color face-or-list) nil)) ;; only background color, not a `real' face ((ps-face-background-color-p (car face-or-list)) - (vector 0 nil (cdr face-or-list))) + (vector 0 nil (ps-face-extract-color face-or-list))) ;; list of faces (t (let ((effects 0)