From: Vinicius Jose Latorre Date: Wed, 9 Jan 2008 03:45:04 +0000 (+0000) Subject: Fix face attributes recognition X-Git-Tag: emacs-pretest-22.1.90~132 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4277a0ecc25c7199dcf4e547402c8e451f6088c1;p=emacs.git Fix face attributes recognition --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4e750cb14c0..8870cfd3947 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2008-01-09 Vinicius Jose Latorre + + * ps-print.el: Some face attributes (like :strike-through) was not + being recognised. Reported by Leo . + (ps-face-strikout-p, ps-face-overline-p, ps-face-box-p): New funs. + (ps-screen-to-bit-face): Fix code. + 2008-01-08 Kevin Ryde * progmodes/compile.el (compilation-error-regexp-alist-alist): diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 6cc57a12ee8..4ee58a8ce29 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -3923,6 +3923,12 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'." (or (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o") (ps-xemacs-face-kind-p face 'SLANT "i\\|o") (memq face ps-italic-faces))) ; Kludge-compatible + + (defalias 'ps-face-strikeout-p 'ignore) + + (defalias 'ps-face-overline-p 'ignore) + + (defalias 'ps-face-box-p 'ignore) ) (t ; Emacs @@ -3943,6 +3949,15 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'." (defun ps-face-italic-p (face) (or (ps-e-face-italic-p face) (memq face ps-italic-faces))) + + (defun ps-face-strikeout-p (face) + (eq (face-attribute face :strike-through) t)) + + (defun ps-face-overline-p (face) + (eq (face-attribute face :overline) t)) + + (defun ps-face-box-p (face) + (not (memq (face-attribute face :box) '(nil unspecified)))) )) @@ -6508,9 +6523,12 @@ If FACE is not a valid face name, use default face." (defun ps-screen-to-bit-face (face) (cons face - (vector (logior (if (ps-face-bold-p face) 1 0) ; bold - (if (ps-face-italic-p face) 2 0) ; italic - (if (ps-face-underlined-p face) 4 0)) ; underline + (vector (logior (if (ps-face-bold-p face) 1 0) ; bold + (if (ps-face-italic-p face) 2 0) ; italic + (if (ps-face-underlined-p face) 4 0) ; underline + (if (ps-face-strikeout-p face) 8 0) ; strikeout + (if (ps-face-overline-p face) 16 0) ; overline + (if (ps-face-box-p face) 64 0)) ; box (ps-face-foreground-name face) (ps-face-background-name face))))