emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lexical-binding in CC-mode


From: Alan Mackenzie
Subject: Re: lexical-binding in CC-mode
Date: Sat, 10 Apr 2021 19:47:17 +0000

Hello, Stefan.

On Mon, Apr 05, 2021 at 14:38:08 -0400, Stefan Monnier wrote:
> Hi Alan,

> We're getting to the last few remaining ELisp files in Emacs still using
> the old non-lexical dialect, so I looked at converting CC-mode to use
> the new dialect as well.  AFAICT the code is basically already prepared
> for that, tho I did find some minor things in the patch below.

The conversion to lexical-binding is now (?)complete and committed to
master.

> Of course, the change should be fully backward compatible (i.e. the
> code sticks to the common subset of the two dialects).

I tried CC Mode (lexical) out with Emacs 24.5, and like you intimated,
it seems to have no problems there.

> See below the result of my attempt in the form of 4 patches.
> 0001 and 0004 are the important ones.  0002 makes the code more regular
> (you already use `declare` at various places, so I think it's good to
> use it more systematically).  0003 is largely a question of taste (and we
> know we don't always agree on that), but I like the warnings it gives me
> when a function is marked obsolete or when I make a typo.

These two patches, one moving edebug specs to `declare' forms, the other
putting #' rather than ' before function names, I haven't done, yet.
Creating them must have been quite a bit of work, so thanks!  Both of
these features are in XEmacs (as I'm sure you've already checked), so
there's nothing much holding me back applying them.

> As usual, take the parts you like,

:-)

>         Stefan

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]