all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: daniel sutton <danielsutton01@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Solving some specific warnings (was: Fixing compilation and byte-compilation warnings before 25.1)
Date: Sat, 14 Nov 2015 12:05:16 +0000	[thread overview]
Message-ID: <CAAdUY-KEsXbbAL-zq1Z_8jXshQpGCYspG81TpnydiUUkTX0JhA@mail.gmail.com> (raw)

Hi Daniel

2015-11-14 5:54 GMT+00:00 daniel sutton <danielsutton01@gmail.com>:
> Hello everyone. I'm a bit new to mucking about in the internals of emacs but
> wanted to help out with cleaning up some compiler and byte compiler
> warnings.

Great!

> I'm building and noticing the error
> minibuffer.el:1697:12 display-completion-list called with 2 arguments but
> accepts only 1.
>
> I'm a little confused as the this function has this signature:
> (defun display-completion-list (completions &optional common-substring) ...)
> In fact, this is a recursive call inside of the function
> display-completion-list.

This is because `display-completion-list' includes the line (declare
(advertised-calling-convention (completions) "24.4")).

This means that, since 24.4, the old way of calling this function was
made obsolete, and it should only be called with one argument now.
Instead of just removing the second argument entirely (which would
break backwards compatibility of code out there) we "pretend" that the
function only takes one argument, so that new code won't use the
second argument.

Normally, the way to solve this warning is to update the way that the
function is being called to conform with the new arglist.
However, looking at the source here, it seems that if the clause `(not
(bufferp standard-output))' is true, then the function just wants to
call itself again (with the same arguments) in a temp-buffer, so you
shouldn't change that.

So it is safe to just mute this warning (and add a comment to the
function saying why). To mute the warning, wrap the form in a
`(with-no-warnings ...)'



             reply	other threads:[~2015-11-14 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-14 12:05 Artur Malabarba [this message]
2015-11-14 18:49 ` Solving some specific warnings (was: Fixing compilation and byte-compilation warnings before 25.1) daniel sutton
2015-11-15 11:57   ` Artur Malabarba

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

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

  git send-email \
    --in-reply-to=CAAdUY-KEsXbbAL-zq1Z_8jXshQpGCYspG81TpnydiUUkTX0JhA@mail.gmail.com \
    --to=bruce.connor.am@gmail.com \
    --cc=danielsutton01@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.