[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: newbie question in gnu emacs
Alex Shnitman <alexsh@hectic.net> writes:
> Dmitry Fink (aka FINiK) writes:
>
> > How can I make it show colored tagswhen editing html?
> > The emacs is out of the redhat dist box and I don't have time
> > to learn any lisp.
>
> If it's emacs and not xemacs, you need to load the hilit19 library
> (M-x load-library, then type hilit19, or put (require 'hilit19) in
> your .emacs to make it permanent), then open your file, it should
> appear highlighted. (Unless I'm mistaken and there's no HTML mode that
> comes with emacs by default; but that doesn't make sense.) If you're
> using xemacs, though, select Options -> Syntax Highlighting ->
> Automatic, and then open your file -- it should appear highlighted.
> Select Options -> Save Options to make this permanent.
>
Or use font-lock (I prefer it to hilit19, but I've been using it for
so long that I forgot why). The minimal requirements are
(require 'font-lock)
;; This is important - large buffers will be fontified stealthily
;; and much faster
(add-hook 'font-lock-mode-hook 'turn-on-lazy-lock)
There is a lot of stuff you can customize and set up, but this
will get you started.
As a matter of fact, I don't see html-mode in emacs-20.2 that came
with RH 5.*, or with emacs-20.3-15 that came with RH 6.0. Apropos
has an (almost empty) html-mode node though. What gives? Xemacs
has html-mode. The above will work for Xemacs and GNU emacs alike.
--
Oleg Goldshmidt goldshmt@netvision.net.il
BLOOMBERG L.P. (BFM) oleg@bfr.co.il