unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Jean TBM <jean@tbm.email>
Cc: 20918@debbugs.gnu.org
Subject: bug#20918: Optional argument skipped
Date: Thu, 01 Aug 2019 22:37:35 +0200	[thread overview]
Message-ID: <87h870d3lc.fsf@mouse.gnus.org> (raw)
In-Reply-To: <20150627192017.GB11992@matrix-linux> (Jean TBM's message of "Sat, 27 Jun 2015 20:20:18 +0100")

Jean TBM <jean@tbm.email> writes:

> SYMPTOM:
> When the keyword &optional is specified more than once, a function will
> behave differently when byte compiled.
>
> EXAMPLE:
>
> (defun foo(&optional value1 &optional value2)
> (message "Value1: %s\nValue2:%s"
>         value1
>         value2)
> )
>
> (foo "a" "b")
> === 
> When not byte compiled:
>
> Value1: a
> Value2: b
>
> When byte compiled:
>
> Value1: b
> Value2: nil

(I'm going through old bug reports that have unfortunately not gotten
any responses.)

It looks like this has been fixed in the intervening years.

Calling foo uncompiled will now yield and error.  Trying to byte-compile
it will also result in an error, so it's now consistent, and I'm closing
this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2019-08-01 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-27 19:20 bug#20918: Optional argument skipped Jean TBM
2019-08-01 20:37 ` Lars Ingebrigtsen [this message]

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=87h870d3lc.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=20918@debbugs.gnu.org \
    --cc=jean@tbm.email \
    /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).