* Minor mode doesn't work in java-mode....How fix?
@ 2009-03-27 17:54 cseberino
2009-03-28 9:30 ` Nikolaj Schumacher
0 siblings, 1 reply; 2+ messages in thread
From: cseberino @ 2009-03-27 17:54 UTC (permalink / raw)
To: help-gnu-emacs
I created a simple minor mode that highlights TABs and characters
beyond column 79.
It works everwhere except java-mode. Is there an easy way to fix
this?
Here is the baby minor mode...
(define-globalized-minor-mode global-warning79-mode
warning79-mode
(lambda ()(warning79-mode t)))
(define-minor-mode warning79-mode
" " nil " W79" nil
(if warning79-mode
(font-lock-add-keywords nil warning79-keyword)
(font-lock-remove-keywords nil warning79-keyword))
(font-lock-fontify-buffer))
(setq warning79-keyword '(("\t+" 0 'highlight)
("^.\\{79\\}\\(.*\\)" 1 'highlight)))
(global-warning79-mode)
cs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Minor mode doesn't work in java-mode....How fix?
2009-03-27 17:54 Minor mode doesn't work in java-mode....How fix? cseberino
@ 2009-03-28 9:30 ` Nikolaj Schumacher
0 siblings, 0 replies; 2+ messages in thread
From: Nikolaj Schumacher @ 2009-03-28 9:30 UTC (permalink / raw)
To: cseberino; +Cc: help-gnu-emacs
cseberino@gmail.com wrote:
> I created a simple minor mode that highlights TABs and characters
> beyond column 79.
> It works everwhere except java-mode. Is there an easy way to fix
> this?
I haven't used this for a while, since Emacs 23 has both these features
built into `whitespace-mode'. But I think you should be able to work
around this by using 'prepend in the keywords.
Check out my old way of doing this: Maybe it'll work.
http://nschum.de/src/emacs/highlight-80+/
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-28 9:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 17:54 Minor mode doesn't work in java-mode....How fix? cseberino
2009-03-28 9:30 ` Nikolaj Schumacher
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.