[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: |
Tue, 16 Jan 2007 00:32:33 -0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061211 SeaMonkey/1.0.7 |
Richard Stallman wrote:
Well, I don't know why, but when the initialization code for
ps-default-bg and ps-default-fg include frame-parameter,
What is the precise test case that you tried?
1. set in the ~/.emacs file:
(setq initial-frame-alist (append '((background-color "DarkSlateGray"))
initial-frame-alist))
(setq default-frame-alist (append '((background-color "DarkSlateGray"))
default-frame-alist))
2. set in emacs/lisp/ps-print.el file:
(defcustom ps-default-bg (frame-parameter nil 'background-color))
3. byte-compile ps-print.el file
4. start new Emacs session
5. type: C-h v ps-default-bg RET
==>> "#ffffff" (white)
6. type: M-: (frame-parameter nil 'background-color) RET
==>> "DarkSlateGray"
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.
I don't understand what that means. Could you show me the code you
have in mind?
Well, the idea is to have the following initialization:
(defcustom ps-default-bg 'frame-parameter)
When ps-print is invoked as, for example:
M-x ps-print-buffer-with-faces RET
The following piece of code is executed:
(setq ps-default-background
(cond
((eq ps-default-bg 'frame-parameter)
(frame-parameter nil 'background-color))
;; ... other conditions ...
))
So, the frame-parameter function is invoked only during ps-print command
activation instead of during ps-print file loading.
ps-default-fg variable is handled in a similar way.
- Re: ps-print-buffer-with-faces doesn't use selected frame's background (was: ps-print-buffer-with-faces in dark background), (continued)
- Re: ps-print-buffer-with-faces doesn't use selected frame's background (was: ps-print-buffer-with-faces in dark background), Vinicius Jose Latorre, 2007/01/09
- Re: ps-print-buffer-with-faces doesn't use selected frame's background (was: ps-print-buffer-with-faces in dark background), Leo, 2007/01/09
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Vinicius Jose Latorre, 2007/01/09
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Vinicius Jose Latorre, 2007/01/10
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Leo, 2007/01/10
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Vinicius Jose Latorre, 2007/01/11
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Leo, 2007/01/11
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Richard Stallman, 2007/01/11
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Vinicius Jose Latorre, 2007/01/11
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Richard Stallman, 2007/01/12
- Re: ps-print-buffer-with-faces doesn't use selected frame's background,
Vinicius Jose Latorre <=
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Richard Stallman, 2007/01/16
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Vinicius Jose Latorre, 2007/01/17
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Richard Stallman, 2007/01/18
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Vinicius Jose Latorre, 2007/01/18
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Richard Stallman, 2007/01/19
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Vinicius Jose Latorre, 2007/01/21
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Leo, 2007/01/21
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Richard Stallman, 2007/01/22
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Leo, 2007/01/22
- Re: ps-print-buffer-with-faces doesn't use selected frame's background, Richard Stallman, 2007/01/12