bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12124: 24.1.50; warning pollution


From: Thierry Volpiatto
Subject: bug#12124: 24.1.50; warning pollution
Date: Sat, 04 Aug 2012 06:15:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>>>> Why instead of keeping old definitions of labels and flet don't we use
>>>> aliases for cl-flet/labels (among others)?
>>> Because they do not do the same (almost, but not quite).
>> But the warnings say to use cl-flet/labels instead, so it should works
>> as expected, what is the difference?
>
> Warnings about obsolete features just point to the replacement feature,
> but in many/most cases a human needs to adjust the code accordingly.
>
> Some of the differences are that `labels' defines lexically-scoped vars
> which can be captured in closures using the lexical-let machinery,
> whereas `cl-labels' relies on lexical-binding to get the same effect, so
> the vars won't get captured if the file doesn't use lexical-binding.
>
> `flet' does something vaguely related to common-lisp's `flet' but in
> a very different way (basically with dynamic scoping rather than
> lexical scoping).  `cl-flet' works like common-lisp's `flet'.  As you
> know, lexical and dynamic scoping often can be used interchangeably, but
> not always.
Ok that's clear, thanks.

>> You can try with helm:
>> install it and byte compile it.
>> Do M-x helm-M-x and type some commands.
>> You should have completion on your command.
>
>> Now switch to another emacs and run the same command:
>> It is not working, no completion.
>> So it is not the flet itself that doesn't work but the function that is
>> called inside this flet clause.
>> recompile with this emacs and restart emacs.
>> It is working.
>
> Please make a separate bug-report for that.  And please give a more
> detailed recipe (especially regarding the "install it, byte compile it
> and do M-x ..." where it's not clear where and how "emacs" is started).
Ok will do that today, thanks.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





reply via email to

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