aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2008-01-09 03:45:04 +0000
committerVinicius Jose Latorre2008-01-09 03:45:04 +0000
commit4277a0ecc25c7199dcf4e547402c8e451f6088c1 (patch)
tree755a242f381e714482584e6d9ce2d2a93afae393
parentbf515869577b12abd42777fb0647259920c862fc (diff)
downloademacs-4277a0ecc25c7199dcf4e547402c8e451f6088c1.tar.gz
emacs-4277a0ecc25c7199dcf4e547402c8e451f6088c1.zip
Fix face attributes recognition
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/ps-print.el24
2 files changed, 28 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4e750cb14c0..8870cfd3947 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12008-01-09 Vinicius Jose Latorre <viniciusjl@ig.com.br>
2
3 * ps-print.el: Some face attributes (like :strike-through) was not
4 being recognised. Reported by Leo <sdl.web@gmail.com>.
5 (ps-face-strikout-p, ps-face-overline-p, ps-face-box-p): New funs.
6 (ps-screen-to-bit-face): Fix code.
7
12008-01-08 Kevin Ryde <user42@zip.com.au> 82008-01-08 Kevin Ryde <user42@zip.com.au>
2 9
3 * progmodes/compile.el (compilation-error-regexp-alist-alist): 10 * 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)'."
3923 (or (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o") 3923 (or (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o")
3924 (ps-xemacs-face-kind-p face 'SLANT "i\\|o") 3924 (ps-xemacs-face-kind-p face 'SLANT "i\\|o")
3925 (memq face ps-italic-faces))) ; Kludge-compatible 3925 (memq face ps-italic-faces))) ; Kludge-compatible
3926
3927 (defalias 'ps-face-strikeout-p 'ignore)
3928
3929 (defalias 'ps-face-overline-p 'ignore)
3930
3931 (defalias 'ps-face-box-p 'ignore)
3926 ) 3932 )
3927 3933
3928 (t ; Emacs 3934 (t ; Emacs
@@ -3943,6 +3949,15 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'."
3943 (defun ps-face-italic-p (face) 3949 (defun ps-face-italic-p (face)
3944 (or (ps-e-face-italic-p face) 3950 (or (ps-e-face-italic-p face)
3945 (memq face ps-italic-faces))) 3951 (memq face ps-italic-faces)))
3952
3953 (defun ps-face-strikeout-p (face)
3954 (eq (face-attribute face :strike-through) t))
3955
3956 (defun ps-face-overline-p (face)
3957 (eq (face-attribute face :overline) t))
3958
3959 (defun ps-face-box-p (face)
3960 (not (memq (face-attribute face :box) '(nil unspecified))))
3946 )) 3961 ))
3947 3962
3948 3963
@@ -6508,9 +6523,12 @@ If FACE is not a valid face name, use default face."
6508 6523
6509(defun ps-screen-to-bit-face (face) 6524(defun ps-screen-to-bit-face (face)
6510 (cons face 6525 (cons face
6511 (vector (logior (if (ps-face-bold-p face) 1 0) ; bold 6526 (vector (logior (if (ps-face-bold-p face) 1 0) ; bold
6512 (if (ps-face-italic-p face) 2 0) ; italic 6527 (if (ps-face-italic-p face) 2 0) ; italic
6513 (if (ps-face-underlined-p face) 4 0)) ; underline 6528 (if (ps-face-underlined-p face) 4 0) ; underline
6529 (if (ps-face-strikeout-p face) 8 0) ; strikeout
6530 (if (ps-face-overline-p face) 16 0) ; overline
6531 (if (ps-face-box-p face) 64 0)) ; box
6514 (ps-face-foreground-name face) 6532 (ps-face-foreground-name face)
6515 (ps-face-background-name face)))) 6533 (ps-face-background-name face))))
6516 6534