* Re: master 06a7963: Remove unused vars in cl-extra.el and tramp.el.
[not found] ` <20170319023229.CB62020DF8@vcs0.savannah.gnu.org>
@ 2017-03-19 8:15 ` Michael Albinus
2017-03-19 12:47 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2017-03-19 8:15 UTC (permalink / raw)
To: emacs-devel; +Cc: Stefan Monnier
monnier@iro.umontreal.ca (Stefan Monnier) writes:
Hi Stefan,
I'm curious:
> * lisp/net/tramp.el (tramp-dissect-file-name): Remove unused `match'.
> (outline-regexp, ls-lisp-use-insert-directory-program): Declare.
> (tramp-find-foreign-file-name-handler): Mark unused arg, remove unused `v`.
[...]
> +(defvar outline-regexp)
> +
>
> +(defvar ls-lisp-use-insert-directory-program)
> +
Why is this needed? Both variables are used let-bound only.
Best regards, Michael.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: master 06a7963: Remove unused vars in cl-extra.el and tramp.el.
2017-03-19 8:15 ` master 06a7963: Remove unused vars in cl-extra.el and tramp.el Michael Albinus
@ 2017-03-19 12:47 ` Stefan Monnier
2017-03-19 17:22 ` Michael Albinus
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2017-03-19 12:47 UTC (permalink / raw)
To: emacs-devel
>> +(defvar outline-regexp)
>> +(defvar ls-lisp-use-insert-directory-program)
> Why is this needed? Both variables are used let-bound only.
Because they rely on dynamic scoping.
I know that you haven't set `lexical-binding` in your files, so it's not
*needed*, but with those declarations tramp.el is compatible with
`lexical-binding` (to the best of my knowledge).
Stefan "whose local Emacs uses lexical-binding everywhere, and
otherwise compiles with byte-compile-force-lexical-warnings"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: master 06a7963: Remove unused vars in cl-extra.el and tramp.el.
2017-03-19 12:47 ` Stefan Monnier
@ 2017-03-19 17:22 ` Michael Albinus
2017-03-19 20:27 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2017-03-19 17:22 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Why is this needed? Both variables are used let-bound only.
>
> Because they rely on dynamic scoping.
> I know that you haven't set `lexical-binding` in your files, so it's not
> *needed*, but with those declarations tramp.el is compatible with
> `lexical-binding` (to the best of my knowledge).
Thanks for explanation.
> Stefan "whose local Emacs uses lexical-binding everywhere, and
> otherwise compiles with byte-compile-force-lexical-warnings"
Tramp is still compatible with Emacs 23. Once this is given up, we might
move Tramp to lexical-binding.
Best regards, Michael.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: master 06a7963: Remove unused vars in cl-extra.el and tramp.el.
2017-03-19 17:22 ` Michael Albinus
@ 2017-03-19 20:27 ` Stefan Monnier
2017-03-23 14:16 ` Michael Albinus
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2017-03-19 20:27 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel
> Tramp is still compatible with Emacs 23. Once this is given up, we might
> move Tramp to lexical-binding.
You can set the lexical-binding:t cookie ans still use the code in
Emacs-23, as long as you make sure you stay to the common subset
(mostly: don't use closures).
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: master 06a7963: Remove unused vars in cl-extra.el and tramp.el.
2017-03-19 20:27 ` Stefan Monnier
@ 2017-03-23 14:16 ` Michael Albinus
0 siblings, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2017-03-23 14:16 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> You can set the lexical-binding:t cookie ans still use the code in
> Emacs-23, as long as you make sure you stay to the common subset
> (mostly: don't use closures).
Done.
> Stefan
Best regards, Michael.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-23 14:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170319023228.20393.27906@vcs0.savannah.gnu.org>
[not found] ` <20170319023229.CB62020DF8@vcs0.savannah.gnu.org>
2017-03-19 8:15 ` master 06a7963: Remove unused vars in cl-extra.el and tramp.el Michael Albinus
2017-03-19 12:47 ` Stefan Monnier
2017-03-19 17:22 ` Michael Albinus
2017-03-19 20:27 ` Stefan Monnier
2017-03-23 14:16 ` Michael Albinus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).