* Doing the impossible: magic font-lock-keywords-only changes
@ 2009-06-04 13:37 Lennart Borgman
2009-06-05 0:17 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Lennart Borgman @ 2009-06-04 13:37 UTC (permalink / raw)
To: Emacs-Devel devel
Todays question:
Can You when You execute this
(message "YY:before: font-lock-keywords-only =%s in buffer %s,
def=%s" font-lock-keywords-only (current-buffer) (default-value
font-lock-keywords-only))
(if (nth 1 defaults)
(set (make-local-variable 'font-lock-keywords-only) t)
(kill-local-variable 'font-lock-keywords-only))
(message "YY:after : font-lock-keywords-only =%s in buffer %s,
def=%s" font-lock-keywords-only (current-buffer) (default-value
font-lock-keywords-only))
and gett this output? :
YY:before: font-lock-keywords-only =nil in buffer only-html.html, def=nil
YY:after : font-lock-keywords-only =t in buffer only-html.html, def=t
I can. Unfortunately.
However I can only do this magic with MuMaMo. But I do not understand
how it does it. Anyone?
Hint: This is in a call from fontification-functions. And the function
where I added the trace above is font-lock-set-defaults.
I am taking a pause now. Some fresh air.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Doing the impossible: magic font-lock-keywords-only changes
2009-06-04 13:37 Doing the impossible: magic font-lock-keywords-only changes Lennart Borgman
@ 2009-06-05 0:17 ` Stefan Monnier
2009-06-05 0:45 ` Lennart Borgman
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2009-06-05 0:17 UTC (permalink / raw)
To: Lennart Borgman; +Cc: Emacs-Devel devel
> (message "YY:before: font-lock-keywords-only =%s in buffer %s,
> def=%s" font-lock-keywords-only (current-buffer) (default-value
> font-lock-keywords-only))
^^^
'
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Doing the impossible: magic font-lock-keywords-only changes
2009-06-05 0:17 ` Stefan Monnier
@ 2009-06-05 0:45 ` Lennart Borgman
2009-06-05 0:46 ` Lennart Borgman
2009-06-05 19:39 ` Davis Herring
0 siblings, 2 replies; 6+ messages in thread
From: Lennart Borgman @ 2009-06-05 0:45 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Emacs-Devel devel
On Fri, Jun 5, 2009 at 2:17 AM, Stefan Monnier<monnier@iro.umontreal.ca> wrote:
>> (message "YY:before: font-lock-keywords-only =%s in buffer %s,
>> def=%s" font-lock-keywords-only (current-buffer) (default-value
>> font-lock-keywords-only))
> ^^^
> '
Ah, did not notice, but in this case the output will be the same
(since font-lock-keywords-only is either t or nil).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Doing the impossible: magic font-lock-keywords-only changes
2009-06-05 0:45 ` Lennart Borgman
@ 2009-06-05 0:46 ` Lennart Borgman
2009-06-05 19:39 ` Davis Herring
1 sibling, 0 replies; 6+ messages in thread
From: Lennart Borgman @ 2009-06-05 0:46 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Emacs-Devel devel
... and the solution to this exercise is in bug 3467 ...
On Fri, Jun 5, 2009 at 2:45 AM, Lennart
Borgman<lennart.borgman@gmail.com> wrote:
> On Fri, Jun 5, 2009 at 2:17 AM, Stefan Monnier<monnier@iro.umontreal.ca> wrote:
>>> (message "YY:before: font-lock-keywords-only =%s in buffer %s,
>>> def=%s" font-lock-keywords-only (current-buffer) (default-value
>>> font-lock-keywords-only))
>> ^^^
>> '
>
> Ah, did not notice, but in this case the output will be the same
> (since font-lock-keywords-only is either t or nil).
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Doing the impossible: magic font-lock-keywords-only changes
2009-06-05 0:45 ` Lennart Borgman
2009-06-05 0:46 ` Lennart Borgman
@ 2009-06-05 19:39 ` Davis Herring
2009-06-05 21:41 ` Lennart Borgman
1 sibling, 1 reply; 6+ messages in thread
From: Davis Herring @ 2009-06-05 19:39 UTC (permalink / raw)
To: Lennart Borgman; +Cc: Stefan Monnier, Emacs-Devel devel
> Ah, did not notice, but in this case the output will be the same
> (since font-lock-keywords-only is either t or nil).
That's not true in general:
(set 'foo t (make-local-variable 'foo) nil)
(cons (default-value foo) (default-value 'foo))
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Doing the impossible: magic font-lock-keywords-only changes
2009-06-05 19:39 ` Davis Herring
@ 2009-06-05 21:41 ` Lennart Borgman
0 siblings, 0 replies; 6+ messages in thread
From: Lennart Borgman @ 2009-06-05 21:41 UTC (permalink / raw)
To: herring; +Cc: Stefan Monnier, Emacs-Devel devel
On Fri, Jun 5, 2009 at 9:39 PM, Davis Herring<herring@lanl.gov> wrote:
>> Ah, did not notice, but in this case the output will be the same
>> (since font-lock-keywords-only is either t or nil).
>
> That's not true in general:
>
> (set 'foo t (make-local-variable 'foo) nil)
> (cons (default-value foo) (default-value 'foo))
Nice example (but set takes only two pars), but I have of course
tested the output again to see if everything is as I thought.
Please see the bug report for more information.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-05 21:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-04 13:37 Doing the impossible: magic font-lock-keywords-only changes Lennart Borgman
2009-06-05 0:17 ` Stefan Monnier
2009-06-05 0:45 ` Lennart Borgman
2009-06-05 0:46 ` Lennart Borgman
2009-06-05 19:39 ` Davis Herring
2009-06-05 21:41 ` Lennart Borgman
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.