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.
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug