[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Emacs HTML modes



>>"Michael" == Michael P Soulier <msoulier@mcss.cas.mcmaster.ca> writes:

  Michael>     Normally the font-lock faces are set during
 Michael> initialization of emacs, either from default values or from
 Michael> the user's ~/.emacs file (like in my case).  However,
 Michael> psgml-mode can't use font-lock because instead of knowing
 Michael> the patterns to specify to font-lock when the mode
 Michael> initializes, it must first parse the DTD for the language
 Michael> being used, and pull out the keywords from it.

	Right.

 Michael> Why is it that this newly-parsed information cannot be used
 Michael> to make a new dynamic call to font-lock? I understood that
 Michael> lisp was quite a dynamically-bound language and such tricks
 Michael> as common in Perl and Python were done much earlier in
 Michael> Lisp. Forgive my ignorance of the font-lock API. As I
 Michael> understand it, you can call font-lock, passing it a list of
 Michael> regexp patterns and corresponding faces for that pattern. I
 Michael> don't follow why updating the patterns and re-fontifying
 Michael> can't be done.

	I guess one would have to ask the author. I suspect the
 answers may have to do with the timeline of the feature appearing in
 various flavours of emacsen and in psgml, whether it was easy to do a
 consistent font-locking in all the supported emacsen flavours, or
 whether he just preferred his  own implementation at that point.

	My, I just reported on what I saw in the code, and how one may
 achieve nicely variegated syntax highlighting using psgml ;-)

	manoj
-- 
 Galbraith's Law of Human Nature: Faced with the choice between
 changing one's mind and proving that there is no need to do so,
 almost everybody gets busy on the proof.
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: