From: Daniel Pfeiffer <occitan@esperanto.org>
Subject: help: Why is font-lock-add-keywords failing in comint???
Date: Tue, 23 Dec 2003 13:01:32 +0100 [thread overview]
Message-ID: <20031223130132.1fd3bde8.occitan@esperanto.org> (raw)
In-Reply-To: <jwvu14soy2u.fsf-monnier+emacs/pretest@vor.iro.umontreal.ca>
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/
next parent reply other threads:[~2003-12-23 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20031125230305.62ef78ae.occitan@esperanto.org>
[not found] ` <jwvu14soy2u.fsf-monnier+emacs/pretest@vor.iro.umontreal.ca>
2003-12-23 12:01 ` Daniel Pfeiffer [this message]
2003-12-23 14:54 ` help: adapting your library to new M-x compile Daniel Pfeiffer
2003-12-25 5:01 ` Ian Zimmerman
2003-12-25 16:36 ` Kai Grossjohann
2003-12-25 23:25 ` Ian Zimmerman
2003-12-26 1:11 ` David Kastrup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031223130132.1fd3bde8.occitan@esperanto.org \
--to=occitan@esperanto.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.