From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#40968: 28.0.50; (apply nil) Date: Wed, 6 May 2020 07:26:36 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="17748"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40968@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 06 09:29:36 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWEUp-0004W6-6t for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 09:29:35 +0200 Original-Received: from localhost ([::1]:59022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWEUo-0001qk-92 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 03:29:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWETK-00008j-3L for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 03:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWETJ-0000QD-Pd for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 03:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWETJ-0001zY-MI for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 03:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 May 2020 07:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40968 X-GNU-PR-Package: emacs Original-Received: via spool by 40968-submit@debbugs.gnu.org id=B40968.15887500407607 (code B ref 40968); Wed, 06 May 2020 07:28:01 +0000 Original-Received: (at 40968) by debbugs.gnu.org; 6 May 2020 07:27:20 +0000 Original-Received: from localhost ([127.0.0.1]:38421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWESe-0001yc-G2 for submit@debbugs.gnu.org; Wed, 06 May 2020 03:27:20 -0400 Original-Received: from mail-oo1-f44.google.com ([209.85.161.44]:34187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWESc-0001yM-Ri for 40968@debbugs.gnu.org; Wed, 06 May 2020 03:27:19 -0400 Original-Received: by mail-oo1-f44.google.com with SMTP id q204so288145ooq.1 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 00:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0IicQivKJAJltDFn4w/hV1KxrsKMA3xPzakDe1+AmXA=; b=JbvR/0xWrO9Ns0/uW0RdFrUYgY8A8JHdMhKZZwwIld99ocviwcEmfDkm1RGs89zea1 bv+4Wq+QYo58gcQWLdBxBVDjGT2ipv4RTHydVnWOvJOawUj4NEkeexITjkdhLKiJIy0C MfEn1rg4hXyRIpSxdwgzJlz3ID5xehQ+uUvlJrkeiB4ZrJJY63M0Gr3t9nad0ZTBxDBr 7fc8HCrPN2jRam8CEy8cnvpW12EX45G8Q2ri8n/qvILe08Jd+7PqI/oZ406cUrMaxjs0 ughQkYU7xcxY//eILaVu57tNz1gugA2umhUW2uT8RDEjfzHAG2CGVcnAfCobHUexAGts QJhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0IicQivKJAJltDFn4w/hV1KxrsKMA3xPzakDe1+AmXA=; b=tImLTb7DT+0hJ7fgaHgXVJD0hv6b18v1DhPxxbiGpAwwpXJKPVb+a3D+Wn/iraetaP LvHKa3Mivt1YF114DMc6vMcnAFa+DXvuQOD0bZfQ84kZ+3N48n2sOtxAuUtzsNCcskgY hlPfXPfWqiBs29ahlJHGxd7qLf2w5DwJo0weJI20K+3wgbBvfVUkYiHFErhdyRIkX2+0 oUCkbOiDzbHojX84ITgUpyIeQhS7JKr7NNQXhrxkyi8trgAXz5qV9oyT2AQ1kU2wwy4x tyYqVQgQFPRdIYdPfu12PZnA0KMQMaPSuufrV6VLYXTRZT0ljooa8rmfYxAQU5SyGoO4 b3kA== X-Gm-Message-State: AGi0Puaq1vKX2re4bV/q1ikmXWugGyqEENbtk4drpfmmNOGd8oCPdkr0 qgp54Jk9PgyBglLlrQ7Kq8aG883NswF0gOc3uHxOFhHWDpA= X-Google-Smtp-Source: APiQypKfgSevJ5o3j5cd1Ff1tWQb/gQjH1+woRgzaE3vcnuPS3nBgBrwg4iGn73RhYieBk/5cnvGlMBFlSTmkPB8sWU= X-Received: by 2002:a4a:ba0b:: with SMTP id b11mr6235711oop.44.1588750033118; Wed, 06 May 2020 00:27:13 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179788 Archived-At: On Wed, May 6, 2020 at 1:51 AM Stefan Kangas wrote: > Pip Cet writes: > > I'm very confused by the behavior of `apply' when given only a single > > argument: when it's a nonempty list, the argument gets spread out and > > passed to Ffuncall (I guess this might be useful sometimes). When it's > > nil, Ffuncall gets called with nargs == 0 and Emacs crashes, at least > > sometimes. > > > > Should we fix the special case or raise apply's minimum argument count to 2? > > I'm personally not a big fan of raising the minimum argument count, > thereby changing the function signature and making it harder to > understand. Thanks. I disagree that it would be harder to understand, though: "the first argument is a function to call, the last argument is a list of arguments" is easy to understand when there are >= 2 arguments, but for a single argument they're in contradiction, aren't they? Indeed, I'd read Fapply's current docstring: Call FUNCTION with our remaining args, using our last arg as list of args. as implying that (apply FUNCTION) is equivalent to (funcall FUNCTION) > We should just fix the bug, IMHO. I don't think we can "just" fix the bug. We need to fix Fapply, change the byte compiler to accept single-argument apply, reformulate the docstring to describe this case, and probably fix the Lisp manual as well. I don't think all that is worth it, to be honest, to save someone the trouble of having to write (apply (car LIST) (cdr LIST)) rather than (apply LIST) (if that is, indeed, what they meant).