unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Michael Albinus <michael.albinus@gmx.de>
Subject: Re: [Emacs-diffs] master 40892b4: ; Tramp: Suppress compiler warnings.
Date: Sat, 03 Oct 2015 10:01:57 -0400	[thread overview]
Message-ID: <jwvr3lc9i0t.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <E1ZiHtD-0003Kq-G3@vcs.savannah.gnu.org> (Michael Albinus's message of "Sat, 03 Oct 2015 08:09:55 +0000")

> -	   (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	other threads:[~2015-10-03 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151003080955.12778.71987@vcs.savannah.gnu.org>
     [not found] ` <E1ZiHtD-0003Kq-G3@vcs.savannah.gnu.org>
2015-10-03 14:01   ` Stefan Monnier [this message]
2015-10-04 11:02     ` [Emacs-diffs] master 40892b4: ; Tramp: Suppress compiler warnings Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvr3lc9i0t.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).