emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #ifdefs not properly faced in printouts


From: Juri Linkov
Subject: Re: #ifdefs not properly faced in printouts
Date: Fri, 17 Jun 2005 09:43:43 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> I think ps-spool-buffer-with-faces, which almost always does a superb
> job, fails at giving "#ifdef" with friends in c-files a proper
> colour. They get coloured in the buffer, but not in the printout.

Thanks for the report.  ps-print doesn't print not only colours of
preprocessor directives, but comment delimiters too.  It does so for
any face that inherit from other faces.  It's a bug.  It should be
WYSIWYG and print all displayed colours.  The patch below fixes that.

Index: lisp/ps-print.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ps-print.el,v
retrieving revision 1.157
diff -u -r1.157 ps-print.el
--- lisp/ps-print.el    6 Jun 2005 15:17:32 -0000       1.157
+++ lisp/ps-print.el    17 Jun 2005 05:04:07 -0000
@@ -1549,9 +1549,10 @@
        (defvar mark-active nil)
        (defun ps-mark-active-p ()
         mark-active)
-       (defalias 'ps-face-foreground-name 'face-foreground)
-       (defalias 'ps-face-background-name 'face-background)
-       ))
+       (defun ps-face-foreground-name (face)
+        (face-foreground face nil t))
+       (defun ps-face-background-name (face)
+        (face-background face nil t))))
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]