From: Glenn Morris <rgm@gnu.org>
To: Joost Kremers <joostkremers@fastmail.fm>
Cc: 19720@debbugs.gnu.org
Subject: bug#19720: 24.4; minor mode's font-lock-add-keywords & auto-mode-alist problem
Date: Wed, 28 Jan 2015 21:42:40 -0500 [thread overview]
Message-ID: <5b8ugm5mu7.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87vbjqplbr.fsf@fastmail.fm> (Joost Kremers's message of "Wed, 28 Jan 2015 23:55:04 +0100")
Joost Kremers wrote:
> Font lock keywords added with `font-lock-add-keywords' in a minor mode's
> activation function do not work when the minor mode is activated in a
> major mode's hook and the major mode is activated through an entry in
> `auto-mode-alist'.
The minimal example works fine:
emacs-24.4 -Q -l foo.el foo.txt
where foo.el has contents:
(define-minor-mode foobar-mode "blah" :initial-value nil
(font-lock-add-keywords nil '(("foobar" . 'font-lock-warning-face))))
(add-hook 'text-mode-hook 'foobar-mode)
and foo.txt contains:
foobar
foobar gets font-lock-warning-face.
So your problem may be specific to your specific modes.
next prev parent reply other threads:[~2015-01-29 2:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 22:55 bug#19720: 24.4; minor mode's font-lock-add-keywords & auto-mode-alist problem Joost Kremers
2015-01-29 2:42 ` Glenn Morris [this message]
2015-01-29 3:14 ` Dmitry Gutov
2015-01-29 3:59 ` Glenn Morris
2015-01-29 6:42 ` Joost Kremers
2015-01-29 10:11 ` Dmitry Gutov
2015-01-29 11:11 ` Joost Kremers
2015-01-29 11:36 ` Dmitry Gutov
2015-01-29 15:12 ` Stefan Monnier
2015-01-30 16:59 ` Joost Kremers
2019-10-30 15:51 ` Lars Ingebrigtsen
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=5b8ugm5mu7.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=19720@debbugs.gnu.org \
--cc=joostkremers@fastmail.fm \
/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.