]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix face attributes recognition
authorVinicius Jose Latorre <viniciusjl@ig.com.br>
Wed, 9 Jan 2008 02:54:16 +0000 (02:54 +0000)
committerVinicius Jose Latorre <viniciusjl@ig.com.br>
Wed, 9 Jan 2008 02:54:16 +0000 (02:54 +0000)
lisp/ChangeLog
lisp/ps-print.el

index 029a81975fa330b8ddb379a3e9a98325cdd4a169..8990c2bb0266817d9441e60dd1f02b212872f954 100644 (file)
@@ -1,3 +1,11 @@
+2008-01-09  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
+
+       * ps-print.el: Some face attributes (like :strike-through) was not
+       being recognised.  Reported by Leo <sdl.web@gmail.com>.
+       (ps-print-version): New version 6.8.2.
+       (ps-face-strikout-p, ps-face-overline-p, ps-face-box-p): New funs.
+       (ps-screen-to-bit-face): Fix code.
+
 2008-01-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * ffap.el (ffap-read-file-or-url): Don't use let-binding to temporarily
index 487332f63230ccbe9bd7b28a843e2537e50bed56..a6a2f4e430211aa59876c930c4eb6b82df591928 100644 (file)
 ;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters)
 ;;     Vinicius Jose Latorre <viniciusjl@ig.com.br>
 ;; Keywords: wp, print, PostScript
-;; Version: 6.8.1
+;; Version: 6.8.2
 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
 
-(defconst ps-print-version "6.8.1"
-  "ps-print.el, v 6.8.1 <2007/11/21 vinicius>
+(defconst ps-print-version "6.8.2"
+  "ps-print.el, v 6.8.2 <2008/01/08 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
@@ -3996,6 +3996,15 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'."
     (or (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))))
+
 (defvar ps-print-color-scale 1.0)
 
 (defun ps-color-scale (color)
@@ -6585,9 +6594,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))))