# HG changeset patch # User Vinicius Jose Latorre # Date 1199850304 0 # Node ID 663f333dd7d0b9ce485d4167dc4bd98f04a3e600 # Parent edded8728ab1f5d394838a4b963303d177fa74e7 Fix face attributes recognition diff -r edded8728ab1 -r 663f333dd7d0 lisp/ChangeLog --- a/lisp/ChangeLog Tue Jan 08 07:56:05 2008 +0000 +++ b/lisp/ChangeLog Wed Jan 09 03:45:04 2008 +0000 @@ -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 -r edded8728ab1 -r 663f333dd7d0 lisp/ps-print.el --- a/lisp/ps-print.el Tue Jan 08 07:56:05 2008 +0000 +++ b/lisp/ps-print.el Wed Jan 09 03:45:04 2008 +0000 @@ -3923,6 +3923,12 @@ (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 @@ (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 @@ (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))))