* What magic is saying "obsolete variable"
@ 2010-12-17 18:21 Lennart Borgman
2010-12-18 15:50 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman @ 2010-12-17 18:21 UTC (permalink / raw)
To: Emacs-Devel devel
I am trying to understand how to get rid of the "obsolete variable"
warnings (and taking care of them, of course), but there is some magic
going on that I do not understand
When stepping through this in edebug
(mumamo-save-buffer-state nil
(remove-list-of-text-properties (point-min) (point-max)
(list 'fontified)))
I get the warning below after passing the next last `)':
Warning: `font-lock-beginning-of-syntax-function' is an obsolete variable (as
of Emacs 23.3); use `syntax-begin-function' instead.
The macro `mumamo-save-buffer-state' is just a copy of
save-buffer-state in font-lock.el (which is not exposed by
font-lock.el).
Can anyone please explain why I get the warning here and maybe what I
can do about it?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What magic is saying "obsolete variable"
2010-12-17 18:21 What magic is saying "obsolete variable" Lennart Borgman
@ 2010-12-18 15:50 ` Stefan Monnier
2010-12-18 19:54 ` Lennart Borgman
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2010-12-18 15:50 UTC (permalink / raw)
To: Lennart Borgman; +Cc: Emacs-Devel devel
> When stepping through this in edebug
> (mumamo-save-buffer-state nil
> (remove-list-of-text-properties (point-min) (point-max)
> (list 'fontified)))
> I get the warning below after passing the next last `)':
> Warning: `font-lock-beginning-of-syntax-function' is an obsolete variable (as
> of Emacs 23.3); use `syntax-begin-function' instead.
This warning comes from the byte-compiler. I have no idea why the
byte-compiler is called during your edebug.
> The macro `mumamo-save-buffer-state' is just a copy of
> save-buffer-state in font-lock.el (which is not exposed by
> font-lock.el).
Newer Emacsen have the macro with-silent-modifications for that, so you
may want to use that one (or a copy of it) instead.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What magic is saying "obsolete variable"
2010-12-18 15:50 ` Stefan Monnier
@ 2010-12-18 19:54 ` Lennart Borgman
0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2010-12-18 19:54 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Emacs-Devel devel
On Sat, Dec 18, 2010 at 4:50 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> When stepping through this in edebug
>
>> (mumamo-save-buffer-state nil
>> (remove-list-of-text-properties (point-min) (point-max)
>> (list 'fontified)))
>
>> I get the warning below after passing the next last `)':
>
>> Warning: `font-lock-beginning-of-syntax-function' is an obsolete variable (as
>> of Emacs 23.3); use `syntax-begin-function' instead.
>
> This warning comes from the byte-compiler. I have no idea why the
> byte-compiler is called during your edebug.
>
>> The macro `mumamo-save-buffer-state' is just a copy of
>> save-buffer-state in font-lock.el (which is not exposed by
>> font-lock.el).
>
> Newer Emacsen have the macro with-silent-modifications for that, so you
> may want to use that one (or a copy of it) instead.
Thanks, I have forgotten to switch to a copy of that.
However this is very similar to the save-buffer-state so I guess it is
not involved here. The differences involved are just
(declare (debug t) (indent 0)) =new=> (declare (indent 1) (debug let))
and an unwind-protect in the new macro.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-18 19:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-17 18:21 What magic is saying "obsolete variable" Lennart Borgman
2010-12-18 15:50 ` Stefan Monnier
2010-12-18 19:54 ` 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.