[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delete-windows-on
From: |
Juanma Barranquero |
Subject: |
Re: delete-windows-on |
Date: |
Fri, 2 Oct 2009 18:30:44 +0200 |
On Fri, Oct 2, 2009 at 18:16, Drew Adams <address@hidden> wrote:
> 3. It raises an error if you pass the name of a non-existent buffer, or if you
> pass anything that is not a string or a buffer (except nil - see #2). Why? Why
> doesn't it just do nothing if the BUFFER arg is not an existing buffer or its
> name?
>
> A nil value of BUFFER means there is no such buffer. The same is true of a
> string that doesn't name an existing buffer. The same is true of a non-string
> such as the number 42. In one case (#2), we currently do nothing and return
> nil;
> in all other cases (#3), we currently raise an error. That's not very
> consistent.
I think it is quite consistent. Passing "whatever" (when "whatever"
exists) is a clear way to say 'act upon "whatever"'. Passing nil (or
omitting the 1st arg) clearly says "act upon the default buffer".
IMHO, passing 42 or "nonexistent-buffer-name" clearly means "Oops,
someone or something just fucked up".
Juanma
- delete-windows-on, Drew Adams, 2009/10/02
- Re: delete-windows-on,
Juanma Barranquero <=
- RE: delete-windows-on, Drew Adams, 2009/10/02
- Re: delete-windows-on, Juanma Barranquero, 2009/10/02
- Re: delete-windows-on, martin rudalics, 2009/10/02
- RE: delete-windows-on, Drew Adams, 2009/10/02
- RE: delete-windows-on, Drew Adams, 2009/10/02
- RE: delete-windows-on, Stephen J. Turnbull, 2009/10/03
- RE: delete-windows-on, Drew Adams, 2009/10/02
- RE: delete-windows-on, Stephen J. Turnbull, 2009/10/02
Re: delete-windows-on, martin rudalics, 2009/10/02