* Re: [Emacs-diffs] master 40892b4: ; Tramp: Suppress compiler warnings.
[not found] ` <E1ZiHtD-0003Kq-G3@vcs.savannah.gnu.org>
@ 2015-10-03 14:01 ` Stefan Monnier
2015-10-04 11:02 ` Michael Albinus
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2015-10-03 14:01 UTC (permalink / raw)
To: emacs-devel; +Cc: Michael Albinus
> - (funcall 'locate-dominating-file (locate-library "tramp") ".git")))
> + (funcall
> + (intern "locate-dominating-file") (locate-library "tramp") ".git")))
I object to such ridiculous uglification in the name of avoiding warnings.
The old code was bad, but the new one reaches new heights of absurdity.
Please write your code in the normal way and then if you don't know how
to silence the corresponding warning, come ask (here and/or in XEmacs's
mailing-list) for advice. Otherwise you're stuck in an arm's race
(e.g. the above will fail again as soon as we add a compiler-macro that
optimizes calls to `intern' with a constant argument).
When does the normal code give you a warning? When compiling under
XEmacs, or under an old Emacs? Have you tried to use (when (fboundp
'locate-dominating-file) ...) or declare-function, which are the
"official" ways to silence such warnings nowadays? Have you tried
`with-no-warning'?
> - (tramp-compat-replace-regexp-in-string
> + (funcall
> + (intern "tramp-compat-replace-regexp-in-string")
And here, how come you get a warning? Can't you make sure the compiler
know that the function is always defined?
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Emacs-diffs] master 40892b4: ; Tramp: Suppress compiler warnings.
2015-10-03 14:01 ` [Emacs-diffs] master 40892b4: ; Tramp: Suppress compiler warnings Stefan Monnier
@ 2015-10-04 11:02 ` Michael Albinus
0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus @ 2015-10-04 11:02 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> - (funcall 'locate-dominating-file (locate-library "tramp") ".git")))
>> + (funcall
>> + (intern "locate-dominating-file") (locate-library "tramp") ".git")))
>
> I object to such ridiculous uglification in the name of avoiding warnings.
> The old code was bad, but the new one reaches new heights of absurdity.
>
>> - (tramp-compat-replace-regexp-in-string
>> + (funcall
>> + (intern "tramp-compat-replace-regexp-in-string")
>
> And here, how come you get a warning? Can't you make sure the compiler
> know that the function is always defined?
I've fixed this and some other glitches in another way.
> Stefan
Best regards, Michael.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-04 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20151003080955.12778.71987@vcs.savannah.gnu.org>
[not found] ` <E1ZiHtD-0003Kq-G3@vcs.savannah.gnu.org>
2015-10-03 14:01 ` [Emacs-diffs] master 40892b4: ; Tramp: Suppress compiler warnings Stefan Monnier
2015-10-04 11:02 ` 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).