* Fontification partly broken in some modes
@ 2012-02-25 10:41 Tassilo Horn
2012-02-25 10:51 ` Chong Yidong
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Tassilo Horn @ 2012-02-25 10:41 UTC (permalink / raw
To: emacs-devel
Hi all,
since I've updated my emacs bzr checkout on February, 23rd (the last
update before that being 3 or 4 days earlier) the message headers in
`gnus-article-mode' aren't fontified anymore. M-x describe-face on a
header just says it's in `default' face. But it should be one of the
`gnus-header-*' faces.
The same applies to rcirc prompts, but only those in channel buffers
that I customized to
(setq rcirc-prompt "%t> ")
i.e., channel name and then ">". In server buffers, the prompts are
just ">" and those are fontified in `rcirc-prompt' face...
Everything else seems to be fontified correctly. Does anyone see that,
too?
Bye,
Tassilo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-25 10:41 Fontification partly broken in some modes Tassilo Horn
@ 2012-02-25 10:51 ` Chong Yidong
2012-02-25 13:16 ` Alan Mackenzie
2012-02-25 18:19 ` Alan Mackenzie
2012-02-25 19:03 ` Thierry Volpiatto
2 siblings, 1 reply; 11+ messages in thread
From: Chong Yidong @ 2012-02-25 10:51 UTC (permalink / raw
To: Alan Mackenzie; +Cc: Tassilo Horn, emacs-devel
Tassilo Horn <tassilo@member.fsf.org> writes:
> Hi all,
>
> since I've updated my emacs bzr checkout on February, 23rd (the last
> update before that being 3 or 4 days earlier) the message headers in
> `gnus-article-mode' aren't fontified anymore. M-x describe-face on a
> header just says it's in `default' face. But it should be one of the
> `gnus-header-*' faces.
Another way to see this is with `C-x v d' (vc-dir): font lock is broken
in the VC-dir header.
This is due to the font-lock changes in revno 107398.
Alan, please fix this ASAP if you can. Otherwise, I'm going to revert
the change so that it won't affect the pretest.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-25 10:51 ` Chong Yidong
@ 2012-02-25 13:16 ` Alan Mackenzie
0 siblings, 0 replies; 11+ messages in thread
From: Alan Mackenzie @ 2012-02-25 13:16 UTC (permalink / raw
To: Chong Yidong; +Cc: Tassilo Horn, emacs-devel
Hello, Yidong.
On Sat, Feb 25, 2012 at 06:51:47PM +0800, Chong Yidong wrote:
> Tassilo Horn <tassilo@member.fsf.org> writes:
> > Hi all,
> > since I've updated my emacs bzr checkout on February, 23rd (the last
> > update before that being 3 or 4 days earlier) the message headers in
> > `gnus-article-mode' aren't fontified anymore. M-x describe-face on a
> > header just says it's in `default' face. But it should be one of the
> > `gnus-header-*' faces.
> Another way to see this is with `C-x v d' (vc-dir): font lock is broken
> in the VC-dir header.
I've not been able to get font-locking in this buffer with pre-107398
versions. Any clues as to what I'm missing?
> This is due to the font-lock changes in revno 107398.
OK.
> Alan, please fix this ASAP if you can. Otherwise, I'm going to revert
> the change so that it won't affect the pretest.
It's looking unlikely I'll manage it, but I'll give it a good try.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-25 10:41 Fontification partly broken in some modes Tassilo Horn
2012-02-25 10:51 ` Chong Yidong
@ 2012-02-25 18:19 ` Alan Mackenzie
2012-02-25 20:46 ` Tassilo Horn
2012-02-25 19:03 ` Thierry Volpiatto
2 siblings, 1 reply; 11+ messages in thread
From: Alan Mackenzie @ 2012-02-25 18:19 UTC (permalink / raw
To: Tassilo Horn; +Cc: emacs-devel
Hello, Tassilo,
On Sat, Feb 25, 2012 at 11:41:38AM +0100, Tassilo Horn wrote:
> Hi all,
> since I've updated my emacs bzr checkout on February, 23rd (the last
> update before that being 3 or 4 days earlier) the message headers in
> `gnus-article-mode' aren't fontified anymore. M-x describe-face on a
> header just says it's in `default' face. But it should be one of the
> `gnus-header-*' faces.
> The same applies to rcirc prompts, but only those in channel buffers
> that I customized to
> (setq rcirc-prompt "%t> ")
> i.e., channel name and then ">". In server buffers, the prompts are
> just ">" and those are fontified in `rcirc-prompt' face...
> Everything else seems to be fontified correctly. Does anyone see that,
> too?
Is there any chance you could send me a recipe to reproduce either of the
above (with any pertinent config files)?
Thanks!
> Bye,
> Tassilo
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-25 10:41 Fontification partly broken in some modes Tassilo Horn
2012-02-25 10:51 ` Chong Yidong
2012-02-25 18:19 ` Alan Mackenzie
@ 2012-02-25 19:03 ` Thierry Volpiatto
2 siblings, 0 replies; 11+ messages in thread
From: Thierry Volpiatto @ 2012-02-25 19:03 UTC (permalink / raw
To: emacs-devel
Hi Tassilo,
Tassilo Horn <tassilo@member.fsf.org> writes:
> Hi all,
>
> since I've updated my emacs bzr checkout on February, 23rd (the last
> update before that being 3 or 4 days earlier) the message headers in
> `gnus-article-mode' aren't fontified anymore. M-x describe-face on a
> header just says it's in `default' face. But it should be one of the
> `gnus-header-*' faces.
>
> The same applies to rcirc prompts, but only those in channel buffers
> that I customized to
>
> (setq rcirc-prompt "%t> ")
>
> i.e., channel name and then ">". In server buffers, the prompts are
> just ">" and those are fontified in `rcirc-prompt' face...
>
> Everything else seems to be fontified correctly. Does anyone see that,
> too?
I had same problem yesterday the February 24 in "anything", but not in
Gnus, after 2 or 3 recompilations of Emacs it's gone.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-25 18:19 ` Alan Mackenzie
@ 2012-02-25 20:46 ` Tassilo Horn
2012-02-26 1:47 ` Alan Mackenzie
0 siblings, 1 reply; 11+ messages in thread
From: Tassilo Horn @ 2012-02-25 20:46 UTC (permalink / raw
To: Alan Mackenzie; +Cc: emacs-devel
Alan Mackenzie <acm@muc.de> writes:
Hi Alan,
>> The same applies to rcirc prompts, but only those in channel buffers
>> that I customized to
>
>> (setq rcirc-prompt "%t> ")
>
>> i.e., channel name and then ">". In server buffers, the prompts are
>> just ">" and those are fontified in `rcirc-prompt' face...
>
>> Everything else seems to be fontified correctly. Does anyone see
>> that, too?
>
> Is there any chance you could send me a recipe to reproduce either of the
> above (with any pertinent config files)?
Sure, rcirc is a bit easier to reproduce:
1. emacs -Q --eval '(setq rcirc-prompt "%t> ")'
2. M-x rcirc RET ;; Will connect to freenode
3. /join #foobar
Now in the buffer for that channel the prompt
#foobar>
is not fontified in `rcirc-prompt' face although it should be. The
prompt of the *irc.freenode.net* buffer is fontified correctly.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-25 20:46 ` Tassilo Horn
@ 2012-02-26 1:47 ` Alan Mackenzie
2012-02-26 4:52 ` Chong Yidong
0 siblings, 1 reply; 11+ messages in thread
From: Alan Mackenzie @ 2012-02-26 1:47 UTC (permalink / raw
To: Tassilo Horn, Chong Yidong; +Cc: emacs-devel
Tassilo, Yidong,
On Sat, Feb 25, 2012 at 09:46:33PM +0100, Tassilo Horn wrote:
> Alan Mackenzie <acm@muc.de> writes:
> Hi Alan,
> >> The same applies to rcirc prompts, but only those in channel buffers
> >> that I customized to
> >> (setq rcirc-prompt "%t> ")
> >> i.e., channel name and then ">". In server buffers, the prompts are
> >> just ">" and those are fontified in `rcirc-prompt' face...
> >> Everything else seems to be fontified correctly. Does anyone see
> >> that, too?
> > Is there any chance you could send me a recipe to reproduce either of the
> > above (with any pertinent config files)?
> Sure, rcirc is a bit easier to reproduce:
> 1. emacs -Q --eval '(setq rcirc-prompt "%t> ")'
> 2. M-x rcirc RET ;; Will connect to freenode
> 3. /join #foobar
Thanks, that was most helpful.
> Now in the buffer for that channel the prompt
> #foobar>
> is not fontified in `rcirc-prompt' face although it should be. The
> prompt of the *irc.freenode.net* buffer is fontified correctly.
Please try the following patch and let me know it works:
=== modified file 'lisp/font-core.el'
*** lisp/font-core.el 2012-02-23 18:51:22 +0000
--- lisp/font-core.el 2012-02-26 01:29:08 +0000
***************
*** 138,144 ****
your own function which is called when `font-lock-mode' is toggled via
`font-lock-function'. "
nil nil nil
! :after-hook (if font-lock-mode (font-lock-initial-fontify))
;; Don't turn on Font Lock mode if we don't have a display (we're running a
;; batch job) or if the buffer is invisible (the name starts with a space).
(when (or noninteractive (eq (aref (buffer-name) 0) ?\s))
--- 138,145 ----
your own function which is called when `font-lock-mode' is toggled via
`font-lock-function'. "
nil nil nil
! :after-hook (if (and font-lock-mode (font-lock-spec-present t))
! (font-lock-initial-fontify))
;; Don't turn on Font Lock mode if we don't have a display (we're running a
;; batch job) or if the buffer is invisible (the name starts with a space).
(when (or noninteractive (eq (aref (buffer-name) 0) ?\s))
***************
*** 166,171 ****
--- 167,182 ----
'(font-lock-face)))
(restore-buffer-modified-p modp)))
+ (defun font-lock-spec-present (mode)
+ "Is there enough specification to do fontification at all?"
+ (or font-lock-defaults
+ (if (boundp 'font-lock-keywords) font-lock-keywords)
+ (and mode
+ (boundp 'font-lock-set-defaults)
+ font-lock-set-defaults
+ font-lock-major-mode
+ (not (eq font-lock-major-mode major-mode)))))
+
(defvar font-lock-set-defaults)
(defun font-lock-default-function (mode)
;; Turn on Font Lock mode.
***************
*** 192,204 ****
;; Only do hard work if the mode has specified stuff in
;; `font-lock-defaults'.
! (when (or font-lock-defaults
! (if (boundp 'font-lock-keywords) font-lock-keywords)
! (and mode
! (boundp 'font-lock-set-defaults)
! font-lock-set-defaults
! font-lock-major-mode
! (not (eq font-lock-major-mode major-mode))))
(font-lock-mode-internal mode)))
(defun turn-on-font-lock ()
--- 203,209 ----
;; Only do hard work if the mode has specified stuff in
;; `font-lock-defaults'.
! (when (font-lock-spec-present mode)
(font-lock-mode-internal mode)))
(defun turn-on-font-lock ()
> Bye,
> Tassilo
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-26 1:47 ` Alan Mackenzie
@ 2012-02-26 4:52 ` Chong Yidong
2012-02-26 13:08 ` Alan Mackenzie
0 siblings, 1 reply; 11+ messages in thread
From: Chong Yidong @ 2012-02-26 4:52 UTC (permalink / raw
To: Alan Mackenzie; +Cc: Tassilo Horn, emacs-devel
Alan Mackenzie <acm@muc.de> writes:
> Please try the following patch and let me know it works:
Looks good, thanks. But I suggest moving the check for font-lock-mode
and font-lock-spec-present into font-lock-initial-fontify, so that you
can just do
:after-hook (font-lock-initial-fontify)
Please to commit, with this modification.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-26 4:52 ` Chong Yidong
@ 2012-02-26 13:08 ` Alan Mackenzie
2012-02-26 16:45 ` Chong Yidong
2012-02-26 19:15 ` Tassilo Horn
0 siblings, 2 replies; 11+ messages in thread
From: Alan Mackenzie @ 2012-02-26 13:08 UTC (permalink / raw
To: Chong Yidong; +Cc: Tassilo Horn, emacs-devel
On Sun, Feb 26, 2012 at 12:52:34PM +0800, Chong Yidong wrote:
> Alan Mackenzie <acm@muc.de> writes:
> > Please try the following patch and let me know it works:
> Looks good, thanks. But I suggest moving the check for font-lock-mode
> and font-lock-spec-present into font-lock-initial-fontify, so that you
> can just do
> :after-hook (font-lock-initial-fontify)
> Please to commit, with this modification.
DONE. Rev. #107741.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-26 13:08 ` Alan Mackenzie
@ 2012-02-26 16:45 ` Chong Yidong
2012-02-26 19:15 ` Tassilo Horn
1 sibling, 0 replies; 11+ messages in thread
From: Chong Yidong @ 2012-02-26 16:45 UTC (permalink / raw
To: Alan Mackenzie; +Cc: Tassilo Horn, emacs-devel
Alan Mackenzie <acm@muc.de> writes:
>> Please to commit, with this modification.
>
> DONE. Rev. #107741.
Great, thanks. I'll make the pretest soon.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fontification partly broken in some modes
2012-02-26 13:08 ` Alan Mackenzie
2012-02-26 16:45 ` Chong Yidong
@ 2012-02-26 19:15 ` Tassilo Horn
1 sibling, 0 replies; 11+ messages in thread
From: Tassilo Horn @ 2012-02-26 19:15 UTC (permalink / raw
To: Alan Mackenzie; +Cc: Chong Yidong, emacs-devel
Alan Mackenzie <acm@muc.de> writes:
Hi Alan,
>> > Please try the following patch and let me know it works:
>
>> Looks good, thanks. But I suggest moving the check for font-lock-mode
>> and font-lock-spec-present into font-lock-initial-fontify, so that you
>> can just do
>
>> :after-hook (font-lock-initial-fontify)
>
>> Please to commit, with this modification.
>
> DONE. Rev. #107741.
I can also confirm that it works again.
Thanks,
Tassilo
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-02-26 19:15 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-25 10:41 Fontification partly broken in some modes Tassilo Horn
2012-02-25 10:51 ` Chong Yidong
2012-02-25 13:16 ` Alan Mackenzie
2012-02-25 18:19 ` Alan Mackenzie
2012-02-25 20:46 ` Tassilo Horn
2012-02-26 1:47 ` Alan Mackenzie
2012-02-26 4:52 ` Chong Yidong
2012-02-26 13:08 ` Alan Mackenzie
2012-02-26 16:45 ` Chong Yidong
2012-02-26 19:15 ` Tassilo Horn
2012-02-25 19:03 ` Thierry Volpiatto
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.