[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make-indirect-buffer
From: |
Miles Bader |
Subject: |
Re: make-indirect-buffer |
Date: |
Mon, 12 Apr 2004 17:04:27 -0400 |
User-agent: |
Mutt/1.3.28i |
On Mon, Apr 12, 2004 at 05:01:09PM -0400, Stefan Monnier wrote:
> The basic idea looks fine, but the above code calls Fget_buffer twice for
> no reason. It seems the following code would work as well:
>
> base_buffer = Fget_buffer (base_buffer);
> if (NILP (base_buffer))
> /* We assume that (get-buffer foo)==nil implies STRINGP (foo).
> Is that true? --Stef */
> error ("No such buffer: `%s'", SDATA (base_buffer));
The error message is different -- you're treating NIL as a string...
It seems to avoid calling Fget_buffer twice, you'd have to save the previous
value of base_buffer and use it in the error message.
-Miles
--
Occam's razor split hairs so well, I bought the whole argument!
Re: make-indirect-buffer, Richard Stallman, 2004/04/13