[Gllug] java editor

Nix nix at esperi.demon.co.uk
Tue Jul 2 07:10:29 UTC 2002


On Mon, 1 Jul 2002, Simon Stewart stipulated:
> On Mon, Jul 01, 2002 at 02:04:43PM -0400, SteveC wrote:
>> Maybe there is a way to automatically invert the font-lock colours in 
>> emacs or something?
> 
> Undoubtedly, Nix will mention something about editing your .emacs file
> to include something like
> 
> (add-hook 'java-mode-hook 'turn-on-font-lock)
> 
> but who am I to utter this foolishness? :)

Well, you got it right, anyway :) although I'd put it on the
c-common-hook so it applied to everything.

You also want to say

(set-face-background 'default "Black")
(set-face-foreground 'default "PowderBlue")

or something in your .emacs, to flip the default colours. (Every other
face inherits from that one so that'll change the Emacs colours across-
the-board.)

But it's more complex than that because lots of other colours and other
modes require fiddling to convince the editor that your background
colour is really dark. Both Emacs and XEmacs attempt to determine the
brightness of your background when you start them up, and pick colours
appropriately (customize lets you define `dark' and `light' colour
schemes...)


About a year ago I went completely demented and redefined a whole bundle
of colours: see
<http://www.esperi.demon.co.uk/nix/xemacs/site-wide/gawd-faces.html> and
the corresponding .el file. Feel free to nick bits, although they'll
need considerable reexpression to work in Emacs: but I can verify that
(by my lights at least) they are a nice light-on-dark combination.

(For XEmacs at least, you'll also need to set the default face's colours
in your .Xresources, viz

Emacs.default.attributeBackground: Black
Emacs.default.attributeForeground: #d7eeee

or something, or XEmacs pre-21.5 won't realise that the background is
dark early enough and will pick the wrong colours for all the other
faces. This is a bug.)

-- 
`What happened?'
                 `Nick shipped buggy code!'
                                             `Oh, no dinner for him...'


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list