help-gnu-emacs
[Top][All Lists]
Advanced

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

help: Why is font-lock-add-keywords failing in comint???


From: Daniel Pfeiffer
Subject: help: Why is font-lock-add-keywords failing in comint???
Date: Tue, 23 Dec 2003 13:01:32 +0100

My new compile v0.19

http://dapfy.bei.t-online.de/compile.el

now has a working minor-mode variant.  That font-lock-add-keywords its own 
stuff to the front of whatever was there.  It then calls turn-on-font-lock, or 
in case that was on, font-lock-fontify-buffer to make sure the new keywords are 
taken into accont.

This works nicely:

M-: (progn (outline-mode) (compilation-minor-mode))

You can also manually call compilation-shell-minor-mode in a comint buffer.  
The only thing that doesn't work, is activating it in the _same_command_ that 
starts a comint, actually comint-mode, not even on the post-command-idle-hook.

This claims font-lock is on, the font-lock-keywords get correctly set, but all 
remains unfontified:

M-: (progn (comint-mode) (compilation-minor-mode))

This promising work-around doesn't help either:

M-: (progn (comint-mode) (remove-hook 'change-major-mode-hook 
'font-lock-defontify t) (compilation-minor-mode))

I can't see what comint-mode is doing that prevents this from working.  How can 
I marry comint-mode in one command with a minor mode that needs to turn on 
font-lock?

Background:

The new compile uses font-lock as its message parser.  And some compilations 
(e.g. TeX) may want to talk back, so comint can be useful.

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / läramå    Esperanto:
                              http://lernu.net/


coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / läramå    Esperanto:
                              http://lernu.net/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]