Re: confusion (aka specifiers...)
giacomo boffi <[email protected]> Mon, 14 Jun 2004 14:54:34 +0200
| Newsgroups | gmane.emacs.xemacs.design |
|---|---|
| Message-ID | <[email protected]> |
Stephen J. Turnbull writes: > >>>>> "giacomo" == giacomo boffi <[email protected]> writes: > > giacomo> [i'm not sure about the correctness of my lexicon] is it > giacomo> possible to add to a specifier an instantiator that > giacomo> matches the frame that has the focus? > > You mean you want (for example) to have the text in the focused > frame to be black on some background, while the text in unfocused > frames is gray80, say? And when the focus leaves a frame, it turns > from black to gray, while the frame that focus enters turns from > gray to black? yes (well, it's the modeline background, but you've hit the target) > As far as I know, you can't do that currently. It's an interesting > idea though, and probably is do-able without performance loss. about performance, now i have ,---- | (set-face-background 'modeline "red3") | (defun modeline-with-focus () | (set-face-background 'modeline "red2" (current-frame))) | (defun modeline-w/o-focus () | (set-face-background 'modeline "red3" (current-frame))) | (add-hook 'selected-frame-hook 'modeline-with-focus) | (add-hook 'deselected-frame-hook 'modeline-w/o-focus) `---- but i see a bit of flicker every time the modeline is changed > The main issue I see with trying to implement is that it's not > obvious to me where such a specification should rank. > > Should the `current-focus' spec have precedence, or should the > `frame-local' spec get it?