[Top][All Lists]

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

Re: ps-print-buffer-with-faces doesn't use selected frame's background

From: Vinicius Jose Latorre
Subject: Re: ps-print-buffer-with-faces doesn't use selected frame's background
Date: Wed, 17 Jan 2007 11:36:25 -0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061211 SeaMonkey/1.0.7

Richard Stallman wrote:
    4. start new Emacs session

    5. type: C-h v ps-default-bg RET
       ==>> "#ffffff" (white)

That is quite strange, because when I do emacs -Q and C-h v ps-default-bg RET it says that variable isn't defined.

I wonder, have you done something to cause ps-print to be preloaded?

Well, the ps-print commands have a comment:


just before the command definition.

When I start Emacs with -Q, typing C-h v ps- TAB appears some options to complete but ps-default-bg is not among them, only ps-multibyte-buffer, ps-page-dimensions-database, ps-paper-type and ps-print-color-p. And these options have the comment ";;;###autoload" just before the variable definition.

    2. set in emacs/lisp/ps-print.el file:
       (defcustom ps-default-bg (frame-parameter nil 'background-color))

Please try this:

       (defcustom ps-default-bg (progn (debug) (frame-parameter nil 

Then you will go into the debugger when that initialization gets run,
and you can see when it gets done, and what code runs it.

Humm, trying the initialization above, I can see that ps-print is loaded before .emacs file is loaded. So, the background is white when ps-print is loaded and, only during .emacs loading, the background is changed.

> If the variables have a value (let's say, 'frame-parameter), the value > of them is calculated when any ps-print command is activated. And it's > used frame-parameter function to get the color value.

With your explanation, I now understand that idea, and I think it is a
good one.

Ok, could I implement it now in Emacs 22 before the release?

reply via email to

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