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

index 4e750cb14c0e6d31247219f1c7397b3300b7008b..8870cfd394775afe365a5be821a8793a6c127762 100644 (file)
@@ -1,3 +1,10 @@
+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-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  <user42@zip.com.au>
 
        * progmodes/compile.el (compilation-error-regexp-alist-alist):
index 6cc57a12ee8952bc6b0ca909db560f43bdb9d466..4ee58a8ce2976cac73ffd9d2361e9d0b6ab53236 100644 (file)
@@ -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))))