From: Miles Bader <miles@gnu.org>
Cc: Luc Teirlinck <teirllm@dms.auburn.edu>, emacs-devel@gnu.org
Subject: Re: make-indirect-buffer
Date: Mon, 12 Apr 2004 17:04:27 -0400 [thread overview]
Message-ID: <20040412210427.GA12000@fencepost> (raw)
In-Reply-To: <m17jwkrk0h.fsf-monnier+emacs@empanada.iro.umontreal.ca>
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!
next prev parent reply other threads:[~2004-04-12 21:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-12 5:19 make-indirect-buffer Luc Teirlinck
2004-04-12 21:01 ` make-indirect-buffer Stefan Monnier
2004-04-12 21:04 ` Miles Bader [this message]
2004-04-12 21:12 ` make-indirect-buffer Luc Teirlinck
2004-04-12 21:22 ` make-indirect-buffer Luc Teirlinck
2004-04-12 21:35 ` make-indirect-buffer Luc Teirlinck
2004-04-12 21:37 ` make-indirect-buffer Luc Teirlinck
2004-04-12 22:53 ` make-indirect-buffer Stefan Monnier
2004-04-12 23:36 ` make-indirect-buffer Luc Teirlinck
2004-04-12 21:27 ` make-indirect-buffer Luc Teirlinck
2004-04-12 21:49 ` make-indirect-buffer Kim F. Storm
2004-04-13 17:45 ` make-indirect-buffer Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2004-04-12 4:58 make-indirect-buffer Luc Teirlinck
2004-04-13 17:45 ` make-indirect-buffer Richard Stallman
2004-03-13 23:23 make-indirect-buffer Luc Teirlinck
2004-03-15 4:56 ` make-indirect-buffer Richard Stallman
2004-03-15 22:37 ` make-indirect-buffer Luc Teirlinck
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=20040412210427.GA12000@fencepost \
--to=miles@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=teirllm@dms.auburn.edu \
/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).