🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #823

Re: emacs

#823
From: Barry Margolin
Date: Mon, 05 Oct 1992 20:35
30 lines
1815 bytes
In article <1992Oct2.133603.28087@linus.mitre.org> djb@bambam.ai.mit.EDU (David J. Braunegg) writes:
>In article <1adeseINNnig@early-bird.think.com> barmar@think.com (Barry Margolin) writes:
>>>In the definition of insert-buffer in simple.el, I suggest replacing
>>>  (interactive "*bInsert buffer: ")
>>>with
>>>  (interactive "*BInsert buffer: ")

>>The interactive "B" code will allow you to specify a nonexistent buffer,

>Or, insert-buffer could be re-written in C instead of elisp.  Then the
>default could be the previous buffer and nonexistent buffers could be
>handled correctly.  The C programming for this is a little beyond me,
>though.

Well, you certainly don't have to go *that* far!  You could also do:

(interactive '(progn
		(barf-if-buffer-read-only)
		(list (read-buffer "Insert buffer: " (other-buffer) t))))

In fact, even without this feature of "interactive", I don't see how
recoding in C would make things any easier than recoding in Lisp to prompt
for the buffer itself (instead of using "interactive").  There are only a
few things in Emacs that you can only do in C code, and prompting for
buffers is not one of them.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Technical Details
Message-ID: <1aq8v1INNpdm@early-bird.think.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!think.com!barmar
References: <9209301431.AA04303@bambam.mitre.org>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!think.com!barmar
From: barmar@think.com (Barry Margolin)
Subject: Re: emacs
Message-ID: <1aq8v1INNpdm@early-bird.think.com>
Sender: gnulists@ai.mit.edu
Organization: Thinking Machines Corporation, Cambridge MA, USA
References: <9209301431.AA04303@bambam.mitre.org> 
Distribution: gnu
Date: Mon, 5 Oct 1992 20:35:45 GMT
Approved: bug-gnu-emacs@prep.ai.mit.edu
Lines: 31