emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 40892b4: ; Tramp: Suppress compiler warnings.


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 40892b4: ; Tramp: Suppress compiler warnings.
Date: Sat, 03 Oct 2015 10:01:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> -        (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



reply via email to

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