* Re: [Emacs-diffs] master 885c512: Fix a bug in 'generate-new-buffer-name'
[not found] ` <20170805095400.0316E20660@vcs0.savannah.gnu.org>
@ 2017-08-05 12:51 ` Stefan Monnier
2017-08-05 13:02 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2017-08-05 12:51 UTC (permalink / raw)
To: emacs-devel; +Cc: Eli Zaretskii
> - if (!NILP (Fstring_equal (name, ignore)) || NILP (Fget_buffer (name)))
> + if ((!NILP (ignore) && !NILP (Fstring_equal (name, ignore)))
> + || NILP (Fget_buffer (name)))
Why not just use Fequal instead of Fstring_equal?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 885c512: Fix a bug in 'generate-new-buffer-name'
2017-08-05 12:51 ` [Emacs-diffs] master 885c512: Fix a bug in 'generate-new-buffer-name' Stefan Monnier
@ 2017-08-05 13:02 ` Eli Zaretskii
2017-08-05 15:14 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2017-08-05 13:02 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Sat, 05 Aug 2017 08:51:28 -0400
>
> > - if (!NILP (Fstring_equal (name, ignore)) || NILP (Fget_buffer (name)))
> > + if ((!NILP (ignore) && !NILP (Fstring_equal (name, ignore)))
> > + || NILP (Fget_buffer (name)))
>
> Why not just use Fequal instead of Fstring_equal?
Because no one said that using a symbol for the IGNORE argument is
forbidden in that function. "nil" just happens to be a special case,
but other strings/symbols are allowed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 885c512: Fix a bug in 'generate-new-buffer-name'
2017-08-05 13:02 ` Eli Zaretskii
@ 2017-08-05 15:14 ` Stefan Monnier
2017-08-05 15:58 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2017-08-05 15:14 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
>> > - if (!NILP (Fstring_equal (name, ignore)) || NILP (Fget_buffer (name)))
>> > + if ((!NILP (ignore) && !NILP (Fstring_equal (name, ignore)))
>> > + || NILP (Fget_buffer (name)))
>> Why not just use Fequal instead of Fstring_equal?
> Because no one said that using a symbol for the IGNORE argument is
> forbidden in that function. "nil" just happens to be a special case,
> but other strings/symbols are allowed.
I'd be surprised if there is code out there that uses a symbol for the
`ignore` argument. And I don't think it's a feature that you can use
a symbol rather than a string. I think it's rather a (harmless (except
for nil)) bug.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] master 885c512: Fix a bug in 'generate-new-buffer-name'
2017-08-05 15:14 ` Stefan Monnier
@ 2017-08-05 15:58 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2017-08-05 15:58 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Sat, 05 Aug 2017 11:14:30 -0400
>
> >> > - if (!NILP (Fstring_equal (name, ignore)) || NILP (Fget_buffer (name)))
> >> > + if ((!NILP (ignore) && !NILP (Fstring_equal (name, ignore)))
> >> > + || NILP (Fget_buffer (name)))
> >> Why not just use Fequal instead of Fstring_equal?
> > Because no one said that using a symbol for the IGNORE argument is
> > forbidden in that function. "nil" just happens to be a special case,
> > but other strings/symbols are allowed.
>
> I'd be surprised if there is code out there that uses a symbol for the
> `ignore` argument. And I don't think it's a feature that you can use
> a symbol rather than a string. I think it's rather a (harmless (except
> for nil)) bug.
Maybe so, but I see no real reason to switch to using Fequal, either.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-05 15:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170805095359.14455.50578@vcs0.savannah.gnu.org>
[not found] ` <20170805095400.0316E20660@vcs0.savannah.gnu.org>
2017-08-05 12:51 ` [Emacs-diffs] master 885c512: Fix a bug in 'generate-new-buffer-name' Stefan Monnier
2017-08-05 13:02 ` Eli Zaretskii
2017-08-05 15:14 ` Stefan Monnier
2017-08-05 15:58 ` Eli Zaretskii
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).